<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
  <title>Assignment_out</title>

  <style type="text/css">
      /*!
*
* Twitter Bootstrap
*
*/
/*!
 * Bootstrap v3.3.6 (http://getbootstrap.com)
 * Copyright 2011-2015 Twitter, Inc.
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 */
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
menu,
nav,
section,
summary {
  display: block;
}
audio,
canvas,
progress,
video {
  display: inline-block;
  vertical-align: baseline;
}
audio:not([controls]) {
  display: none;
  height: 0;
}
[hidden],
template {
  display: none;
}
a {
  background-color: transparent;
}
a:active,
a:hover {
  outline: 0;
}
abbr[title] {
  border-bottom: 1px dotted;
}
b,
strong {
  font-weight: bold;
}
dfn {
  font-style: italic;
}
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}
mark {
  background: #ff0;
  color: #000;
}
small {
  font-size: 80%;
}
sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}
sup {
  top: -0.5em;
}
sub {
  bottom: -0.25em;
}
img {
  border: 0;
}
svg:not(:root) {
  overflow: hidden;
}
figure {
  margin: 1em 40px;
}
hr {
  box-sizing: content-box;
  height: 0;
}
pre {
  overflow: auto;
}
code,
kbd,
pre,
samp {
  font-family: monospace, monospace;
  font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
  color: inherit;
  font: inherit;
  margin: 0;
}
button {
  overflow: visible;
}
button,
select {
  text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
  -webkit-appearance: button;
  cursor: pointer;
}
button[disabled],
html input[disabled] {
  cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
  border: 0;
  padding: 0;
}
input {
  line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
  box-sizing: border-box;
  padding: 0;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  height: auto;
}
input[type="search"] {
  -webkit-appearance: textfield;
  box-sizing: content-box;
}
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}
fieldset {
  border: 1px solid #c0c0c0;
  margin: 0 2px;
  padding: 0.35em 0.625em 0.75em;
}
legend {
  border: 0;
  padding: 0;
}
textarea {
  overflow: auto;
}
optgroup {
  font-weight: bold;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}
td,
th {
  padding: 0;
}
/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a,
  a:visited {
    text-decoration: underline;
  }
  a[href]:after {
    content: " (" attr(href) ")";
  }
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  thead {
    display: table-header-group;
  }
  tr,
  img {
    page-break-inside: avoid;
  }
  img {
    max-width: 100% !important;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
  .navbar {
    display: none;
  }
  .btn > .caret,
  .dropup > .btn > .caret {
    border-top-color: #000 !important;
  }
  .label {
    border: 1px solid #000;
  }
  .table {
    border-collapse: collapse !important;
  }
  .table td,
  .table th {
    background-color: #fff !important;
  }
  .table-bordered th,
  .table-bordered td {
    border: 1px solid #ddd !important;
  }
}
@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('../components/bootstrap/fonts/glyphicons-halflings-regular.eot');
  src: url('../components/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../components/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
}
.glyphicon {
  position: relative;
  top: 1px;
  display: inline-block;
  font-family: 'Glyphicons Halflings';
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.glyphicon-asterisk:before {
  content: "\002a";
}
.glyphicon-plus:before {
  content: "\002b";
}
.glyphicon-euro:before,
.glyphicon-eur:before {
  content: "\20ac";
}
.glyphicon-minus:before {
  content: "\2212";
}
.glyphicon-cloud:before {
  content: "\2601";
}
.glyphicon-envelope:before {
  content: "\2709";
}
.glyphicon-pencil:before {
  content: "\270f";
}
.glyphicon-glass:before {
  content: "\e001";
}
.glyphicon-music:before {
  content: "\e002";
}
.glyphicon-search:before {
  content: "\e003";
}
.glyphicon-heart:before {
  content: "\e005";
}
.glyphicon-star:before {
  content: "\e006";
}
.glyphicon-star-empty:before {
  content: "\e007";
}
.glyphicon-user:before {
  content: "\e008";
}
.glyphicon-film:before {
  content: "\e009";
}
.glyphicon-th-large:before {
  content: "\e010";
}
.glyphicon-th:before {
  content: "\e011";
}
.glyphicon-th-list:before {
  content: "\e012";
}
.glyphicon-ok:before {
  content: "\e013";
}
.glyphicon-remove:before {
  content: "\e014";
}
.glyphicon-zoom-in:before {
  content: "\e015";
}
.glyphicon-zoom-out:before {
  content: "\e016";
}
.glyphicon-off:before {
  content: "\e017";
}
.glyphicon-signal:before {
  content: "\e018";
}
.glyphicon-cog:before {
  content: "\e019";
}
.glyphicon-trash:before {
  content: "\e020";
}
.glyphicon-home:before {
  content: "\e021";
}
.glyphicon-file:before {
  content: "\e022";
}
.glyphicon-time:before {
  content: "\e023";
}
.glyphicon-road:before {
  content: "\e024";
}
.glyphicon-download-alt:before {
  content: "\e025";
}
.glyphicon-download:before {
  content: "\e026";
}
.glyphicon-upload:before {
  content: "\e027";
}
.glyphicon-inbox:before {
  content: "\e028";
}
.glyphicon-play-circle:before {
  content: "\e029";
}
.glyphicon-repeat:before {
  content: "\e030";
}
.glyphicon-refresh:before {
  content: "\e031";
}
.glyphicon-list-alt:before {
  content: "\e032";
}
.glyphicon-lock:before {
  content: "\e033";
}
.glyphicon-flag:before {
  content: "\e034";
}
.glyphicon-headphones:before {
  content: "\e035";
}
.glyphicon-volume-off:before {
  content: "\e036";
}
.glyphicon-volume-down:before {
  content: "\e037";
}
.glyphicon-volume-up:before {
  content: "\e038";
}
.glyphicon-qrcode:before {
  content: "\e039";
}
.glyphicon-barcode:before {
  content: "\e040";
}
.glyphicon-tag:before {
  content: "\e041";
}
.glyphicon-tags:before {
  content: "\e042";
}
.glyphicon-book:before {
  content: "\e043";
}
.glyphicon-bookmark:before {
  content: "\e044";
}
.glyphicon-print:before {
  content: "\e045";
}
.glyphicon-camera:before {
  content: "\e046";
}
.glyphicon-font:before {
  content: "\e047";
}
.glyphicon-bold:before {
  content: "\e048";
}
.glyphicon-italic:before {
  content: "\e049";
}
.glyphicon-text-height:before {
  content: "\e050";
}
.glyphicon-text-width:before {
  content: "\e051";
}
.glyphicon-align-left:before {
  content: "\e052";
}
.glyphicon-align-center:before {
  content: "\e053";
}
.glyphicon-align-right:before {
  content: "\e054";
}
.glyphicon-align-justify:before {
  content: "\e055";
}
.glyphicon-list:before {
  content: "\e056";
}
.glyphicon-indent-left:before {
  content: "\e057";
}
.glyphicon-indent-right:before {
  content: "\e058";
}
.glyphicon-facetime-video:before {
  content: "\e059";
}
.glyphicon-picture:before {
  content: "\e060";
}
.glyphicon-map-marker:before {
  content: "\e062";
}
.glyphicon-adjust:before {
  content: "\e063";
}
.glyphicon-tint:before {
  content: "\e064";
}
.glyphicon-edit:before {
  content: "\e065";
}
.glyphicon-share:before {
  content: "\e066";
}
.glyphicon-check:before {
  content: "\e067";
}
.glyphicon-move:before {
  content: "\e068";
}
.glyphicon-step-backward:before {
  content: "\e069";
}
.glyphicon-fast-backward:before {
  content: "\e070";
}
.glyphicon-backward:before {
  content: "\e071";
}
.glyphicon-play:before {
  content: "\e072";
}
.glyphicon-pause:before {
  content: "\e073";
}
.glyphicon-stop:before {
  content: "\e074";
}
.glyphicon-forward:before {
  content: "\e075";
}
.glyphicon-fast-forward:before {
  content: "\e076";
}
.glyphicon-step-forward:before {
  content: "\e077";
}
.glyphicon-eject:before {
  content: "\e078";
}
.glyphicon-chevron-left:before {
  content: "\e079";
}
.glyphicon-chevron-right:before {
  content: "\e080";
}
.glyphicon-plus-sign:before {
  content: "\e081";
}
.glyphicon-minus-sign:before {
  content: "\e082";
}
.glyphicon-remove-sign:before {
  content: "\e083";
}
.glyphicon-ok-sign:before {
  content: "\e084";
}
.glyphicon-question-sign:before {
  content: "\e085";
}
.glyphicon-info-sign:before {
  content: "\e086";
}
.glyphicon-screenshot:before {
  content: "\e087";
}
.glyphicon-remove-circle:before {
  content: "\e088";
}
.glyphicon-ok-circle:before {
  content: "\e089";
}
.glyphicon-ban-circle:before {
  content: "\e090";
}
.glyphicon-arrow-left:before {
  content: "\e091";
}
.glyphicon-arrow-right:before {
  content: "\e092";
}
.glyphicon-arrow-up:before {
  content: "\e093";
}
.glyphicon-arrow-down:before {
  content: "\e094";
}
.glyphicon-share-alt:before {
  content: "\e095";
}
.glyphicon-resize-full:before {
  content: "\e096";
}
.glyphicon-resize-small:before {
  content: "\e097";
}
.glyphicon-exclamation-sign:before {
  content: "\e101";
}
.glyphicon-gift:before {
  content: "\e102";
}
.glyphicon-leaf:before {
  content: "\e103";
}
.glyphicon-fire:before {
  content: "\e104";
}
.glyphicon-eye-open:before {
  content: "\e105";
}
.glyphicon-eye-close:before {
  content: "\e106";
}
.glyphicon-warning-sign:before {
  content: "\e107";
}
.glyphicon-plane:before {
  content: "\e108";
}
.glyphicon-calendar:before {
  content: "\e109";
}
.glyphicon-random:before {
  content: "\e110";
}
.glyphicon-comment:before {
  content: "\e111";
}
.glyphicon-magnet:before {
  content: "\e112";
}
.glyphicon-chevron-up:before {
  content: "\e113";
}
.glyphicon-chevron-down:before {
  content: "\e114";
}
.glyphicon-retweet:before {
  content: "\e115";
}
.glyphicon-shopping-cart:before {
  content: "\e116";
}
.glyphicon-folder-close:before {
  content: "\e117";
}
.glyphicon-folder-open:before {
  content: "\e118";
}
.glyphicon-resize-vertical:before {
  content: "\e119";
}
.glyphicon-resize-horizontal:before {
  content: "\e120";
}
.glyphicon-hdd:before {
  content: "\e121";
}
.glyphicon-bullhorn:before {
  content: "\e122";
}
.glyphicon-bell:before {
  content: "\e123";
}
.glyphicon-certificate:before {
  content: "\e124";
}
.glyphicon-thumbs-up:before {
  content: "\e125";
}
.glyphicon-thumbs-down:before {
  content: "\e126";
}
.glyphicon-hand-right:before {
  content: "\e127";
}
.glyphicon-hand-left:before {
  content: "\e128";
}
.glyphicon-hand-up:before {
  content: "\e129";
}
.glyphicon-hand-down:before {
  content: "\e130";
}
.glyphicon-circle-arrow-right:before {
  content: "\e131";
}
.glyphicon-circle-arrow-left:before {
  content: "\e132";
}
.glyphicon-circle-arrow-up:before {
  content: "\e133";
}
.glyphicon-circle-arrow-down:before {
  content: "\e134";
}
.glyphicon-globe:before {
  content: "\e135";
}
.glyphicon-wrench:before {
  content: "\e136";
}
.glyphicon-tasks:before {
  content: "\e137";
}
.glyphicon-filter:before {
  content: "\e138";
}
.glyphicon-briefcase:before {
  content: "\e139";
}
.glyphicon-fullscreen:before {
  content: "\e140";
}
.glyphicon-dashboard:before {
  content: "\e141";
}
.glyphicon-paperclip:before {
  content: "\e142";
}
.glyphicon-heart-empty:before {
  content: "\e143";
}
.glyphicon-link:before {
  content: "\e144";
}
.glyphicon-phone:before {
  content: "\e145";
}
.glyphicon-pushpin:before {
  content: "\e146";
}
.glyphicon-usd:before {
  content: "\e148";
}
.glyphicon-gbp:before {
  content: "\e149";
}
.glyphicon-sort:before {
  content: "\e150";
}
.glyphicon-sort-by-alphabet:before {
  content: "\e151";
}
.glyphicon-sort-by-alphabet-alt:before {
  content: "\e152";
}
.glyphicon-sort-by-order:before {
  content: "\e153";
}
.glyphicon-sort-by-order-alt:before {
  content: "\e154";
}
.glyphicon-sort-by-attributes:before {
  content: "\e155";
}
.glyphicon-sort-by-attributes-alt:before {
  content: "\e156";
}
.glyphicon-unchecked:before {
  content: "\e157";
}
.glyphicon-expand:before {
  content: "\e158";
}
.glyphicon-collapse-down:before {
  content: "\e159";
}
.glyphicon-collapse-up:before {
  content: "\e160";
}
.glyphicon-log-in:before {
  content: "\e161";
}
.glyphicon-flash:before {
  content: "\e162";
}
.glyphicon-log-out:before {
  content: "\e163";
}
.glyphicon-new-window:before {
  content: "\e164";
}
.glyphicon-record:before {
  content: "\e165";
}
.glyphicon-save:before {
  content: "\e166";
}
.glyphicon-open:before {
  content: "\e167";
}
.glyphicon-saved:before {
  content: "\e168";
}
.glyphicon-import:before {
  content: "\e169";
}
.glyphicon-export:before {
  content: "\e170";
}
.glyphicon-send:before {
  content: "\e171";
}
.glyphicon-floppy-disk:before {
  content: "\e172";
}
.glyphicon-floppy-saved:before {
  content: "\e173";
}
.glyphicon-floppy-remove:before {
  content: "\e174";
}
.glyphicon-floppy-save:before {
  content: "\e175";
}
.glyphicon-floppy-open:before {
  content: "\e176";
}
.glyphicon-credit-card:before {
  content: "\e177";
}
.glyphicon-transfer:before {
  content: "\e178";
}
.glyphicon-cutlery:before {
  content: "\e179";
}
.glyphicon-header:before {
  content: "\e180";
}
.glyphicon-compressed:before {
  content: "\e181";
}
.glyphicon-earphone:before {
  content: "\e182";
}
.glyphicon-phone-alt:before {
  content: "\e183";
}
.glyphicon-tower:before {
  content: "\e184";
}
.glyphicon-stats:before {
  content: "\e185";
}
.glyphicon-sd-video:before {
  content: "\e186";
}
.glyphicon-hd-video:before {
  content: "\e187";
}
.glyphicon-subtitles:before {
  content: "\e188";
}
.glyphicon-sound-stereo:before {
  content: "\e189";
}
.glyphicon-sound-dolby:before {
  content: "\e190";
}
.glyphicon-sound-5-1:before {
  content: "\e191";
}
.glyphicon-sound-6-1:before {
  content: "\e192";
}
.glyphicon-sound-7-1:before {
  content: "\e193";
}
.glyphicon-copyright-mark:before {
  content: "\e194";
}
.glyphicon-registration-mark:before {
  content: "\e195";
}
.glyphicon-cloud-download:before {
  content: "\e197";
}
.glyphicon-cloud-upload:before {
  content: "\e198";
}
.glyphicon-tree-conifer:before {
  content: "\e199";
}
.glyphicon-tree-deciduous:before {
  content: "\e200";
}
.glyphicon-cd:before {
  content: "\e201";
}
.glyphicon-save-file:before {
  content: "\e202";
}
.glyphicon-open-file:before {
  content: "\e203";
}
.glyphicon-level-up:before {
  content: "\e204";
}
.glyphicon-copy:before {
  content: "\e205";
}
.glyphicon-paste:before {
  content: "\e206";
}
.glyphicon-alert:before {
  content: "\e209";
}
.glyphicon-equalizer:before {
  content: "\e210";
}
.glyphicon-king:before {
  content: "\e211";
}
.glyphicon-queen:before {
  content: "\e212";
}
.glyphicon-pawn:before {
  content: "\e213";
}
.glyphicon-bishop:before {
  content: "\e214";
}
.glyphicon-knight:before {
  content: "\e215";
}
.glyphicon-baby-formula:before {
  content: "\e216";
}
.glyphicon-tent:before {
  content: "\26fa";
}
.glyphicon-blackboard:before {
  content: "\e218";
}
.glyphicon-bed:before {
  content: "\e219";
}
.glyphicon-apple:before {
  content: "\f8ff";
}
.glyphicon-erase:before {
  content: "\e221";
}
.glyphicon-hourglass:before {
  content: "\231b";
}
.glyphicon-lamp:before {
  content: "\e223";
}
.glyphicon-duplicate:before {
  content: "\e224";
}
.glyphicon-piggy-bank:before {
  content: "\e225";
}
.glyphicon-scissors:before {
  content: "\e226";
}
.glyphicon-bitcoin:before {
  content: "\e227";
}
.glyphicon-btc:before {
  content: "\e227";
}
.glyphicon-xbt:before {
  content: "\e227";
}
.glyphicon-yen:before {
  content: "\00a5";
}
.glyphicon-jpy:before {
  content: "\00a5";
}
.glyphicon-ruble:before {
  content: "\20bd";
}
.glyphicon-rub:before {
  content: "\20bd";
}
.glyphicon-scale:before {
  content: "\e230";
}
.glyphicon-ice-lolly:before {
  content: "\e231";
}
.glyphicon-ice-lolly-tasted:before {
  content: "\e232";
}
.glyphicon-education:before {
  content: "\e233";
}
.glyphicon-option-horizontal:before {
  content: "\e234";
}
.glyphicon-option-vertical:before {
  content: "\e235";
}
.glyphicon-menu-hamburger:before {
  content: "\e236";
}
.glyphicon-modal-window:before {
  content: "\e237";
}
.glyphicon-oil:before {
  content: "\e238";
}
.glyphicon-grain:before {
  content: "\e239";
}
.glyphicon-sunglasses:before {
  content: "\e240";
}
.glyphicon-text-size:before {
  content: "\e241";
}
.glyphicon-text-color:before {
  content: "\e242";
}
.glyphicon-text-background:before {
  content: "\e243";
}
.glyphicon-object-align-top:before {
  content: "\e244";
}
.glyphicon-object-align-bottom:before {
  content: "\e245";
}
.glyphicon-object-align-horizontal:before {
  content: "\e246";
}
.glyphicon-object-align-left:before {
  content: "\e247";
}
.glyphicon-object-align-vertical:before {
  content: "\e248";
}
.glyphicon-object-align-right:before {
  content: "\e249";
}
.glyphicon-triangle-right:before {
  content: "\e250";
}
.glyphicon-triangle-left:before {
  content: "\e251";
}
.glyphicon-triangle-bottom:before {
  content: "\e252";
}
.glyphicon-triangle-top:before {
  content: "\e253";
}
.glyphicon-console:before {
  content: "\e254";
}
.glyphicon-superscript:before {
  content: "\e255";
}
.glyphicon-subscript:before {
  content: "\e256";
}
.glyphicon-menu-left:before {
  content: "\e257";
}
.glyphicon-menu-right:before {
  content: "\e258";
}
.glyphicon-menu-down:before {
  content: "\e259";
}
.glyphicon-menu-up:before {
  content: "\e260";
}
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
*:before,
*:after {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
html {
  font-size: 10px;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.42857143;
  color: #000;
  background-color: #fff;
}
input,
button,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
a {
  color: #337ab7;
  text-decoration: none;
}
a:hover,
a:focus {
  color: #23527c;
  text-decoration: underline;
}
a:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
figure {
  margin: 0;
}
img {
  vertical-align: middle;
}
.img-responsive,
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
  display: block;
  max-width: 100%;
  height: auto;
}
.img-rounded {
  border-radius: 3px;
}
.img-thumbnail {
  padding: 4px;
  line-height: 1.42857143;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 2px;
  -webkit-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  display: inline-block;
  max-width: 100%;
  height: auto;
}
.img-circle {
  border-radius: 50%;
}
hr {
  margin-top: 18px;
  margin-bottom: 18px;
  border: 0;
  border-top: 1px solid #eeeeee;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  clip: auto;
}
[role="button"] {
  cursor: pointer;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  font-family: inherit;
  font-weight: 500;
  line-height: 1.1;
  color: inherit;
}
h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small,
.h1 small,
.h2 small,
.h3 small,
.h4 small,
.h5 small,
.h6 small,
h1 .small,
h2 .small,
h3 .small,
h4 .small,
h5 .small,
h6 .small,
.h1 .small,
.h2 .small,
.h3 .small,
.h4 .small,
.h5 .small,
.h6 .small {
  font-weight: normal;
  line-height: 1;
  color: #777777;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
  margin-top: 18px;
  margin-bottom: 9px;
}
h1 small,
.h1 small,
h2 small,
.h2 small,
h3 small,
.h3 small,
h1 .small,
.h1 .small,
h2 .small,
.h2 .small,
h3 .small,
.h3 .small {
  font-size: 65%;
}
h4,
.h4,
h5,
.h5,
h6,
.h6 {
  margin-top: 9px;
  margin-bottom: 9px;
}
h4 small,
.h4 small,
h5 small,
.h5 small,
h6 small,
.h6 small,
h4 .small,
.h4 .small,
h5 .small,
.h5 .small,
h6 .small,
.h6 .small {
  font-size: 75%;
}
h1,
.h1 {
  font-size: 33px;
}
h2,
.h2 {
  font-size: 27px;
}
h3,
.h3 {
  font-size: 23px;
}
h4,
.h4 {
  font-size: 17px;
}
h5,
.h5 {
  font-size: 13px;
}
h6,
.h6 {
  font-size: 12px;
}
p {
  margin: 0 0 9px;
}
.lead {
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.4;
}
@media (min-width: 768px) {
  .lead {
    font-size: 19.5px;
  }
}
small,
.small {
  font-size: 92%;
}
mark,
.mark {
  background-color: #fcf8e3;
  padding: .2em;
}
.text-left {
  text-align: left;
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.text-justify {
  text-align: justify;
}
.text-nowrap {
  white-space: nowrap;
}
.text-lowercase {
  text-transform: lowercase;
}
.text-uppercase {
  text-transform: uppercase;
}
.text-capitalize {
  text-transform: capitalize;
}
.text-muted {
  color: #777777;
}
.text-primary {
  color: #337ab7;
}
a.text-primary:hover,
a.text-primary:focus {
  color: #286090;
}
.text-success {
  color: #3c763d;
}
a.text-success:hover,
a.text-success:focus {
  color: #2b542c;
}
.text-info {
  color: #31708f;
}
a.text-info:hover,
a.text-info:focus {
  color: #245269;
}
.text-warning {
  color: #8a6d3b;
}
a.text-warning:hover,
a.text-warning:focus {
  color: #66512c;
}
.text-danger {
  color: #a94442;
}
a.text-danger:hover,
a.text-danger:focus {
  color: #843534;
}
.bg-primary {
  color: #fff;
  background-color: #337ab7;
}
a.bg-primary:hover,
a.bg-primary:focus {
  background-color: #286090;
}
.bg-success {
  background-color: #dff0d8;
}
a.bg-success:hover,
a.bg-success:focus {
  background-color: #c1e2b3;
}
.bg-info {
  background-color: #d9edf7;
}
a.bg-info:hover,
a.bg-info:focus {
  background-color: #afd9ee;
}
.bg-warning {
  background-color: #fcf8e3;
}
a.bg-warning:hover,
a.bg-warning:focus {
  background-color: #f7ecb5;
}
.bg-danger {
  background-color: #f2dede;
}
a.bg-danger:hover,
a.bg-danger:focus {
  background-color: #e4b9b9;
}
.page-header {
  padding-bottom: 8px;
  margin: 36px 0 18px;
  border-bottom: 1px solid #eeeeee;
}
ul,
ol {
  margin-top: 0;
  margin-bottom: 9px;
}
ul ul,
ol ul,
ul ol,
ol ol {
  margin-bottom: 0;
}
.list-unstyled {
  padding-left: 0;
  list-style: none;
}
.list-inline {
  padding-left: 0;
  list-style: none;
  margin-left: -5px;
}
.list-inline > li {
  display: inline-block;
  padding-left: 5px;
  padding-right: 5px;
}
dl {
  margin-top: 0;
  margin-bottom: 18px;
}
dt,
dd {
  line-height: 1.42857143;
}
dt {
  font-weight: bold;
}
dd {
  margin-left: 0;
}
@media (min-width: 541px) {
  .dl-horizontal dt {
    float: left;
    width: 160px;
    clear: left;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dl-horizontal dd {
    margin-left: 180px;
  }
}
abbr[title],
abbr[data-original-title] {
  cursor: help;
  border-bottom: 1px dotted #777777;
}
.initialism {
  font-size: 90%;
  text-transform: uppercase;
}
blockquote {
  padding: 9px 18px;
  margin: 0 0 18px;
  font-size: inherit;
  border-left: 5px solid #eeeeee;
}
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
  margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
  display: block;
  font-size: 80%;
  line-height: 1.42857143;
  color: #777777;
}
blockquote footer:before,
blockquote small:before,
blockquote .small:before {
  content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
  padding-right: 15px;
  padding-left: 0;
  border-right: 5px solid #eeeeee;
  border-left: 0;
  text-align: right;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
  content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
  content: '\00A0 \2014';
}
address {
  margin-bottom: 18px;
  font-style: normal;
  line-height: 1.42857143;
}
code,
kbd,
pre,
samp {
  font-family: monospace;
}
code {
  padding: 2px 4px;
  font-size: 90%;
  color: #c7254e;
  background-color: #f9f2f4;
  border-radius: 2px;
}
kbd {
  padding: 2px 4px;
  font-size: 90%;
  color: #888;
  background-color: transparent;
  border-radius: 1px;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
kbd kbd {
  padding: 0;
  font-size: 100%;
  font-weight: bold;
  box-shadow: none;
}
pre {
  display: block;
  padding: 8.5px;
  margin: 0 0 9px;
  font-size: 12px;
  line-height: 1.42857143;
  word-break: break-all;
  word-wrap: break-word;
  color: #333333;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 2px;
}
pre code {
  padding: 0;
  font-size: inherit;
  color: inherit;
  white-space: pre-wrap;
  background-color: transparent;
  border-radius: 0;
}
.pre-scrollable {
  max-height: 340px;
  overflow-y: scroll;
}
.container {
  margin-right: auto;
  margin-left: auto;
  padding-left: 0px;
  padding-right: 0px;
}
@media (min-width: 768px) {
  .container {
    width: 768px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 940px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1140px;
  }
}
.container-fluid {
  margin-right: auto;
  margin-left: auto;
  padding-left: 0px;
  padding-right: 0px;
}
.row {
  margin-left: 0px;
  margin-right: 0px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
  position: relative;
  min-height: 1px;
  padding-left: 0px;
  padding-right: 0px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
  float: left;
}
.col-xs-12 {
  width: 100%;
}
.col-xs-11 {
  width: 91.66666667%;
}
.col-xs-10 {
  width: 83.33333333%;
}
.col-xs-9 {
  width: 75%;
}
.col-xs-8 {
  width: 66.66666667%;
}
.col-xs-7 {
  width: 58.33333333%;
}
.col-xs-6 {
  width: 50%;
}
.col-xs-5 {
  width: 41.66666667%;
}
.col-xs-4 {
  width: 33.33333333%;
}
.col-xs-3 {
  width: 25%;
}
.col-xs-2 {
  width: 16.66666667%;
}
.col-xs-1 {
  width: 8.33333333%;
}
.col-xs-pull-12 {
  right: 100%;
}
.col-xs-pull-11 {
  right: 91.66666667%;
}
.col-xs-pull-10 {
  right: 83.33333333%;
}
.col-xs-pull-9 {
  right: 75%;
}
.col-xs-pull-8 {
  right: 66.66666667%;
}
.col-xs-pull-7 {
  right: 58.33333333%;
}
.col-xs-pull-6 {
  right: 50%;
}
.col-xs-pull-5 {
  right: 41.66666667%;
}
.col-xs-pull-4 {
  right: 33.33333333%;
}
.col-xs-pull-3 {
  right: 25%;
}
.col-xs-pull-2 {
  right: 16.66666667%;
}
.col-xs-pull-1 {
  right: 8.33333333%;
}
.col-xs-pull-0 {
  right: auto;
}
.col-xs-push-12 {
  left: 100%;
}
.col-xs-push-11 {
  left: 91.66666667%;
}
.col-xs-push-10 {
  left: 83.33333333%;
}
.col-xs-push-9 {
  left: 75%;
}
.col-xs-push-8 {
  left: 66.66666667%;
}
.col-xs-push-7 {
  left: 58.33333333%;
}
.col-xs-push-6 {
  left: 50%;
}
.col-xs-push-5 {
  left: 41.66666667%;
}
.col-xs-push-4 {
  left: 33.33333333%;
}
.col-xs-push-3 {
  left: 25%;
}
.col-xs-push-2 {
  left: 16.66666667%;
}
.col-xs-push-1 {
  left: 8.33333333%;
}
.col-xs-push-0 {
  left: auto;
}
.col-xs-offset-12 {
  margin-left: 100%;
}
.col-xs-offset-11 {
  margin-left: 91.66666667%;
}
.col-xs-offset-10 {
  margin-left: 83.33333333%;
}
.col-xs-offset-9 {
  margin-left: 75%;
}
.col-xs-offset-8 {
  margin-left: 66.66666667%;
}
.col-xs-offset-7 {
  margin-left: 58.33333333%;
}
.col-xs-offset-6 {
  margin-left: 50%;
}
.col-xs-offset-5 {
  margin-left: 41.66666667%;
}
.col-xs-offset-4 {
  margin-left: 33.33333333%;
}
.col-xs-offset-3 {
  margin-left: 25%;
}
.col-xs-offset-2 {
  margin-left: 16.66666667%;
}
.col-xs-offset-1 {
  margin-left: 8.33333333%;
}
.col-xs-offset-0 {
  margin-left: 0%;
}
@media (min-width: 768px) {
  .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
    float: left;
  }
  .col-sm-12 {
    width: 100%;
  }
  .col-sm-11 {
    width: 91.66666667%;
  }
  .col-sm-10 {
    width: 83.33333333%;
  }
  .col-sm-9 {
    width: 75%;
  }
  .col-sm-8 {
    width: 66.66666667%;
  }
  .col-sm-7 {
    width: 58.33333333%;
  }
  .col-sm-6 {
    width: 50%;
  }
  .col-sm-5 {
    width: 41.66666667%;
  }
  .col-sm-4 {
    width: 33.33333333%;
  }
  .col-sm-3 {
    width: 25%;
  }
  .col-sm-2 {
    width: 16.66666667%;
  }
  .col-sm-1 {
    width: 8.33333333%;
  }
  .col-sm-pull-12 {
    right: 100%;
  }
  .col-sm-pull-11 {
    right: 91.66666667%;
  }
  .col-sm-pull-10 {
    right: 83.33333333%;
  }
  .col-sm-pull-9 {
    right: 75%;
  }
  .col-sm-pull-8 {
    right: 66.66666667%;
  }
  .col-sm-pull-7 {
    right: 58.33333333%;
  }
  .col-sm-pull-6 {
    right: 50%;
  }
  .col-sm-pull-5 {
    right: 41.66666667%;
  }
  .col-sm-pull-4 {
    right: 33.33333333%;
  }
  .col-sm-pull-3 {
    right: 25%;
  }
  .col-sm-pull-2 {
    right: 16.66666667%;
  }
  .col-sm-pull-1 {
    right: 8.33333333%;
  }
  .col-sm-pull-0 {
    right: auto;
  }
  .col-sm-push-12 {
    left: 100%;
  }
  .col-sm-push-11 {
    left: 91.66666667%;
  }
  .col-sm-push-10 {
    left: 83.33333333%;
  }
  .col-sm-push-9 {
    left: 75%;
  }
  .col-sm-push-8 {
    left: 66.66666667%;
  }
  .col-sm-push-7 {
    left: 58.33333333%;
  }
  .col-sm-push-6 {
    left: 50%;
  }
  .col-sm-push-5 {
    left: 41.66666667%;
  }
  .col-sm-push-4 {
    left: 33.33333333%;
  }
  .col-sm-push-3 {
    left: 25%;
  }
  .col-sm-push-2 {
    left: 16.66666667%;
  }
  .col-sm-push-1 {
    left: 8.33333333%;
  }
  .col-sm-push-0 {
    left: auto;
  }
  .col-sm-offset-12 {
    margin-left: 100%;
  }
  .col-sm-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-sm-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-sm-offset-9 {
    margin-left: 75%;
  }
  .col-sm-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-sm-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-sm-offset-6 {
    margin-left: 50%;
  }
  .col-sm-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-sm-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-sm-offset-3 {
    margin-left: 25%;
  }
  .col-sm-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-sm-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-sm-offset-0 {
    margin-left: 0%;
  }
}
@media (min-width: 992px) {
  .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
    float: left;
  }
  .col-md-12 {
    width: 100%;
  }
  .col-md-11 {
    width: 91.66666667%;
  }
  .col-md-10 {
    width: 83.33333333%;
  }
  .col-md-9 {
    width: 75%;
  }
  .col-md-8 {
    width: 66.66666667%;
  }
  .col-md-7 {
    width: 58.33333333%;
  }
  .col-md-6 {
    width: 50%;
  }
  .col-md-5 {
    width: 41.66666667%;
  }
  .col-md-4 {
    width: 33.33333333%;
  }
  .col-md-3 {
    width: 25%;
  }
  .col-md-2 {
    width: 16.66666667%;
  }
  .col-md-1 {
    width: 8.33333333%;
  }
  .col-md-pull-12 {
    right: 100%;
  }
  .col-md-pull-11 {
    right: 91.66666667%;
  }
  .col-md-pull-10 {
    right: 83.33333333%;
  }
  .col-md-pull-9 {
    right: 75%;
  }
  .col-md-pull-8 {
    right: 66.66666667%;
  }
  .col-md-pull-7 {
    right: 58.33333333%;
  }
  .col-md-pull-6 {
    right: 50%;
  }
  .col-md-pull-5 {
    right: 41.66666667%;
  }
  .col-md-pull-4 {
    right: 33.33333333%;
  }
  .col-md-pull-3 {
    right: 25%;
  }
  .col-md-pull-2 {
    right: 16.66666667%;
  }
  .col-md-pull-1 {
    right: 8.33333333%;
  }
  .col-md-pull-0 {
    right: auto;
  }
  .col-md-push-12 {
    left: 100%;
  }
  .col-md-push-11 {
    left: 91.66666667%;
  }
  .col-md-push-10 {
    left: 83.33333333%;
  }
  .col-md-push-9 {
    left: 75%;
  }
  .col-md-push-8 {
    left: 66.66666667%;
  }
  .col-md-push-7 {
    left: 58.33333333%;
  }
  .col-md-push-6 {
    left: 50%;
  }
  .col-md-push-5 {
    left: 41.66666667%;
  }
  .col-md-push-4 {
    left: 33.33333333%;
  }
  .col-md-push-3 {
    left: 25%;
  }
  .col-md-push-2 {
    left: 16.66666667%;
  }
  .col-md-push-1 {
    left: 8.33333333%;
  }
  .col-md-push-0 {
    left: auto;
  }
  .col-md-offset-12 {
    margin-left: 100%;
  }
  .col-md-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-md-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-md-offset-9 {
    margin-left: 75%;
  }
  .col-md-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-md-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-md-offset-6 {
    margin-left: 50%;
  }
  .col-md-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-md-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-md-offset-3 {
    margin-left: 25%;
  }
  .col-md-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-md-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-md-offset-0 {
    margin-left: 0%;
  }
}
@media (min-width: 1200px) {
  .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
    float: left;
  }
  .col-lg-12 {
    width: 100%;
  }
  .col-lg-11 {
    width: 91.66666667%;
  }
  .col-lg-10 {
    width: 83.33333333%;
  }
  .col-lg-9 {
    width: 75%;
  }
  .col-lg-8 {
    width: 66.66666667%;
  }
  .col-lg-7 {
    width: 58.33333333%;
  }
  .col-lg-6 {
    width: 50%;
  }
  .col-lg-5 {
    width: 41.66666667%;
  }
  .col-lg-4 {
    width: 33.33333333%;
  }
  .col-lg-3 {
    width: 25%;
  }
  .col-lg-2 {
    width: 16.66666667%;
  }
  .col-lg-1 {
    width: 8.33333333%;
  }
  .col-lg-pull-12 {
    right: 100%;
  }
  .col-lg-pull-11 {
    right: 91.66666667%;
  }
  .col-lg-pull-10 {
    right: 83.33333333%;
  }
  .col-lg-pull-9 {
    right: 75%;
  }
  .col-lg-pull-8 {
    right: 66.66666667%;
  }
  .col-lg-pull-7 {
    right: 58.33333333%;
  }
  .col-lg-pull-6 {
    right: 50%;
  }
  .col-lg-pull-5 {
    right: 41.66666667%;
  }
  .col-lg-pull-4 {
    right: 33.33333333%;
  }
  .col-lg-pull-3 {
    right: 25%;
  }
  .col-lg-pull-2 {
    right: 16.66666667%;
  }
  .col-lg-pull-1 {
    right: 8.33333333%;
  }
  .col-lg-pull-0 {
    right: auto;
  }
  .col-lg-push-12 {
    left: 100%;
  }
  .col-lg-push-11 {
    left: 91.66666667%;
  }
  .col-lg-push-10 {
    left: 83.33333333%;
  }
  .col-lg-push-9 {
    left: 75%;
  }
  .col-lg-push-8 {
    left: 66.66666667%;
  }
  .col-lg-push-7 {
    left: 58.33333333%;
  }
  .col-lg-push-6 {
    left: 50%;
  }
  .col-lg-push-5 {
    left: 41.66666667%;
  }
  .col-lg-push-4 {
    left: 33.33333333%;
  }
  .col-lg-push-3 {
    left: 25%;
  }
  .col-lg-push-2 {
    left: 16.66666667%;
  }
  .col-lg-push-1 {
    left: 8.33333333%;
  }
  .col-lg-push-0 {
    left: auto;
  }
  .col-lg-offset-12 {
    margin-left: 100%;
  }
  .col-lg-offset-11 {
    margin-left: 91.66666667%;
  }
  .col-lg-offset-10 {
    margin-left: 83.33333333%;
  }
  .col-lg-offset-9 {
    margin-left: 75%;
  }
  .col-lg-offset-8 {
    margin-left: 66.66666667%;
  }
  .col-lg-offset-7 {
    margin-left: 58.33333333%;
  }
  .col-lg-offset-6 {
    margin-left: 50%;
  }
  .col-lg-offset-5 {
    margin-left: 41.66666667%;
  }
  .col-lg-offset-4 {
    margin-left: 33.33333333%;
  }
  .col-lg-offset-3 {
    margin-left: 25%;
  }
  .col-lg-offset-2 {
    margin-left: 16.66666667%;
  }
  .col-lg-offset-1 {
    margin-left: 8.33333333%;
  }
  .col-lg-offset-0 {
    margin-left: 0%;
  }
}
table {
  background-color: transparent;
}
caption {
  padding-top: 8px;
  padding-bottom: 8px;
  color: #777777;
  text-align: left;
}
th {
  text-align: left;
}
.table {
  width: 100%;
  max-width: 100%;
  margin-bottom: 18px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
  padding: 8px;
  line-height: 1.42857143;
  vertical-align: top;
  border-top: 1px solid #ddd;
}
.table > thead > tr > th {
  vertical-align: bottom;
  border-bottom: 2px solid #ddd;
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
  border-top: 0;
}
.table > tbody + tbody {
  border-top: 2px solid #ddd;
}
.table .table {
  background-color: #fff;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
  padding: 5px;
}
.table-bordered {
  border: 1px solid #ddd;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
  border: 1px solid #ddd;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
  border-bottom-width: 2px;
}
.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f9f9f9;
}
.table-hover > tbody > tr:hover {
  background-color: #f5f5f5;
}
table col[class*="col-"] {
  position: static;
  float: none;
  display: table-column;
}
table td[class*="col-"],
table th[class*="col-"] {
  position: static;
  float: none;
  display: table-cell;
}
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
  background-color: #f5f5f5;
}
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
  background-color: #e8e8e8;
}
.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
  background-color: #dff0d8;
}
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
  background-color: #d0e9c6;
}
.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
  background-color: #d9edf7;
}
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
  background-color: #c4e3f3;
}
.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
  background-color: #fcf8e3;
}
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
  background-color: #faf2cc;
}
.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
  background-color: #f2dede;
}
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
  background-color: #ebcccc;
}
.table-responsive {
  overflow-x: auto;
  min-height: 0.01%;
}
@media screen and (max-width: 767px) {
  .table-responsive {
    width: 100%;
    margin-bottom: 13.5px;
    overflow-y: hidden;
    -ms-overflow-style: -ms-autohiding-scrollbar;
    border: 1px solid #ddd;
  }
  .table-responsive > .table {
    margin-bottom: 0;
  }
  .table-responsive > .table > thead > tr > th,
  .table-responsive > .table > tbody > tr > th,
  .table-responsive > .table > tfoot > tr > th,
  .table-responsive > .table > thead > tr > td,
  .table-responsive > .table > tbody > tr > td,
  .table-responsive > .table > tfoot > tr > td {
    white-space: nowrap;
  }
  .table-responsive > .table-bordered {
    border: 0;
  }
  .table-responsive > .table-bordered > thead > tr > th:first-child,
  .table-responsive > .table-bordered > tbody > tr > th:first-child,
  .table-responsive > .table-bordered > tfoot > tr > th:first-child,
  .table-responsive > .table-bordered > thead > tr > td:first-child,
  .table-responsive > .table-bordered > tbody > tr > td:first-child,
  .table-responsive > .table-bordered > tfoot > tr > td:first-child {
    border-left: 0;
  }
  .table-responsive > .table-bordered > thead > tr > th:last-child,
  .table-responsive > .table-bordered > tbody > tr > th:last-child,
  .table-responsive > .table-bordered > tfoot > tr > th:last-child,
  .table-responsive > .table-bordered > thead > tr > td:last-child,
  .table-responsive > .table-bordered > tbody > tr > td:last-child,
  .table-responsive > .table-bordered > tfoot > tr > td:last-child {
    border-right: 0;
  }
  .table-responsive > .table-bordered > tbody > tr:last-child > th,
  .table-responsive > .table-bordered > tfoot > tr:last-child > th,
  .table-responsive > .table-bordered > tbody > tr:last-child > td,
  .table-responsive > .table-bordered > tfoot > tr:last-child > td {
    border-bottom: 0;
  }
}
fieldset {
  padding: 0;
  margin: 0;
  border: 0;
  min-width: 0;
}
legend {
  display: block;
  width: 100%;
  padding: 0;
  margin-bottom: 18px;
  font-size: 19.5px;
  line-height: inherit;
  color: #333333;
  border: 0;
  border-bottom: 1px solid #e5e5e5;
}
label {
  display: inline-block;
  max-width: 100%;
  margin-bottom: 5px;
  font-weight: bold;
}
input[type="search"] {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
}
input[type="radio"],
input[type="checkbox"] {
  margin: 4px 0 0;
  margin-top: 1px \9;
  line-height: normal;
}
input[type="file"] {
  display: block;
}
input[type="range"] {
  display: block;
  width: 100%;
}
select[multiple],
select[size] {
  height: auto;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
output {
  display: block;
  padding-top: 7px;
  font-size: 13px;
  line-height: 1.42857143;
  color: #555555;
}
.form-control {
  display: block;
  width: 100%;
  height: 32px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.42857143;
  color: #555555;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ccc;
  border-radius: 2px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.form-control::-moz-placeholder {
  color: #999;
  opacity: 1;
}
.form-control:-ms-input-placeholder {
  color: #999;
}
.form-control::-webkit-input-placeholder {
  color: #999;
}
.form-control::-ms-expand {
  border: 0;
  background-color: transparent;
}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
  background-color: #eeeeee;
  opacity: 1;
}
.form-control[disabled],
fieldset[disabled] .form-control {
  cursor: not-allowed;
}
textarea.form-control {
  height: auto;
}
input[type="search"] {
  -webkit-appearance: none;
}
@media screen and (-webkit-min-device-pixel-ratio: 0) {
  input[type="date"].form-control,
  input[type="time"].form-control,
  input[type="datetime-local"].form-control,
  input[type="month"].form-control {
    line-height: 32px;
  }
  input[type="date"].input-sm,
  input[type="time"].input-sm,
  input[type="datetime-local"].input-sm,
  input[type="month"].input-sm,
  .input-group-sm input[type="date"],
  .input-group-sm input[type="time"],
  .input-group-sm input[type="datetime-local"],
  .input-group-sm input[type="month"] {
    line-height: 30px;
  }
  input[type="date"].input-lg,
  input[type="time"].input-lg,
  input[type="datetime-local"].input-lg,
  input[type="month"].input-lg,
  .input-group-lg input[type="date"],
  .input-group-lg input[type="time"],
  .input-group-lg input[type="datetime-local"],
  .input-group-lg input[type="month"] {
    line-height: 45px;
  }
}
.form-group {
  margin-bottom: 15px;
}
.radio,
.checkbox {
  position: relative;
  display: block;
  margin-top: 10px;
  margin-bottom: 10px;
}
.radio label,
.checkbox label {
  min-height: 18px;
  padding-left: 20px;
  margin-bottom: 0;
  font-weight: normal;
  cursor: pointer;
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
  position: absolute;
  margin-left: -20px;
  margin-top: 4px \9;
}
.radio + .radio,
.checkbox + .checkbox {
  margin-top: -5px;
}
.radio-inline,
.checkbox-inline {
  position: relative;
  display: inline-block;
  padding-left: 20px;
  margin-bottom: 0;
  vertical-align: middle;
  font-weight: normal;
  cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
  margin-top: 0;
  margin-left: 10px;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"].disabled,
input[type="checkbox"].disabled,
fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"] {
  cursor: not-allowed;
}
.radio-inline.disabled,
.checkbox-inline.disabled,
fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox-inline {
  cursor: not-allowed;
}
.radio.disabled label,
.checkbox.disabled label,
fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label {
  cursor: not-allowed;
}
.form-control-static {
  padding-top: 7px;
  padding-bottom: 7px;
  margin-bottom: 0;
  min-height: 31px;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
  padding-left: 0;
  padding-right: 0;
}
.input-sm {
  height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 1px;
}
select.input-sm {
  height: 30px;
  line-height: 30px;
}
textarea.input-sm,
select[multiple].input-sm {
  height: auto;
}
.form-group-sm .form-control {
  height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 1px;
}
.form-group-sm select.form-control {
  height: 30px;
  line-height: 30px;
}
.form-group-sm textarea.form-control,
.form-group-sm select[multiple].form-control {
  height: auto;
}
.form-group-sm .form-control-static {
  height: 30px;
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
}
.input-lg {
  height: 45px;
  padding: 10px 16px;
  font-size: 17px;
  line-height: 1.3333333;
  border-radius: 3px;
}
select.input-lg {
  height: 45px;
  line-height: 45px;
}
textarea.input-lg,
select[multiple].input-lg {
  height: auto;
}
.form-group-lg .form-control {
  height: 45px;
  padding: 10px 16px;
  font-size: 17px;
  line-height: 1.3333333;
  border-radius: 3px;
}
.form-group-lg select.form-control {
  height: 45px;
  line-height: 45px;
}
.form-group-lg textarea.form-control,
.form-group-lg select[multiple].form-control {
  height: auto;
}
.form-group-lg .form-control-static {
  height: 45px;
  min-height: 35px;
  padding: 11px 16px;
  font-size: 17px;
  line-height: 1.3333333;
}
.has-feedback {
  position: relative;
}
.has-feedback .form-control {
  padding-right: 40px;
}
.form-control-feedback {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  display: block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  pointer-events: none;
}
.input-lg + .form-control-feedback,
.input-group-lg + .form-control-feedback,
.form-group-lg .form-control + .form-control-feedback {
  width: 45px;
  height: 45px;
  line-height: 45px;
}
.input-sm + .form-control-feedback,
.input-group-sm + .form-control-feedback,
.form-group-sm .form-control + .form-control-feedback {
  width: 30px;
  height: 30px;
  line-height: 30px;
}
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline,
.has-success.radio label,
.has-success.checkbox label,
.has-success.radio-inline label,
.has-success.checkbox-inline label {
  color: #3c763d;
}
.has-success .form-control {
  border-color: #3c763d;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-success .form-control:focus {
  border-color: #2b542c;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
}
.has-success .input-group-addon {
  color: #3c763d;
  border-color: #3c763d;
  background-color: #dff0d8;
}
.has-success .form-control-feedback {
  color: #3c763d;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .radio,
.has-warning .checkbox,
.has-warning .radio-inline,
.has-warning .checkbox-inline,
.has-warning.radio label,
.has-warning.checkbox label,
.has-warning.radio-inline label,
.has-warning.checkbox-inline label {
  color: #8a6d3b;
}
.has-warning .form-control {
  border-color: #8a6d3b;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-warning .form-control:focus {
  border-color: #66512c;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
}
.has-warning .input-group-addon {
  color: #8a6d3b;
  border-color: #8a6d3b;
  background-color: #fcf8e3;
}
.has-warning .form-control-feedback {
  color: #8a6d3b;
}
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline,
.has-error.radio label,
.has-error.checkbox label,
.has-error.radio-inline label,
.has-error.checkbox-inline label {
  color: #a94442;
}
.has-error .form-control {
  border-color: #a94442;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .form-control:focus {
  border-color: #843534;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}
.has-error .input-group-addon {
  color: #a94442;
  border-color: #a94442;
  background-color: #f2dede;
}
.has-error .form-control-feedback {
  color: #a94442;
}
.has-feedback label ~ .form-control-feedback {
  top: 23px;
}
.has-feedback label.sr-only ~ .form-control-feedback {
  top: 0;
}
.help-block {
  display: block;
  margin-top: 5px;
  margin-bottom: 10px;
  color: #404040;
}
@media (min-width: 768px) {
  .form-inline .form-group {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
  }
  .form-inline .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
  }
  .form-inline .form-control-static {
    display: inline-block;
  }
  .form-inline .input-group {
    display: inline-table;
    vertical-align: middle;
  }
  .form-inline .input-group .input-group-addon,
  .form-inline .input-group .input-group-btn,
  .form-inline .input-group .form-control {
    width: auto;
  }
  .form-inline .input-group > .form-control {
    width: 100%;
  }
  .form-inline .control-label {
    margin-bottom: 0;
    vertical-align: middle;
  }
  .form-inline .radio,
  .form-inline .checkbox {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
  }
  .form-inline .radio label,
  .form-inline .checkbox label {
    padding-left: 0;
  }
  .form-inline .radio input[type="radio"],
  .form-inline .checkbox input[type="checkbox"] {
    position: relative;
    margin-left: 0;
  }
  .form-inline .has-feedback .form-control-feedback {
    top: 0;
  }
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 7px;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
  min-height: 25px;
}
.form-horizontal .form-group {
  margin-left: 0px;
  margin-right: 0px;
}
@media (min-width: 768px) {
  .form-horizontal .control-label {
    text-align: right;
    margin-bottom: 0;
    padding-top: 7px;
  }
}
.form-horizontal .has-feedback .form-control-feedback {
  right: 0px;
}
@media (min-width: 768px) {
  .form-horizontal .form-group-lg .control-label {
    padding-top: 11px;
    font-size: 17px;
  }
}
@media (min-width: 768px) {
  .form-horizontal .form-group-sm .control-label {
    padding-top: 6px;
    font-size: 12px;
  }
}
.btn {
  display: inline-block;
  margin-bottom: 0;
  font-weight: normal;
  text-align: center;
  vertical-align: middle;
  touch-action: manipulation;
  cursor: pointer;
  background-image: none;
  border: 1px solid transparent;
  white-space: nowrap;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.42857143;
  border-radius: 2px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
  outline: thin dotted;
  outline: 5px auto -webkit-focus-ring-color;
  outline-offset: -2px;
}
.btn:hover,
.btn:focus,
.btn.focus {
  color: #333;
  text-decoration: none;
}
.btn:active,
.btn.active {
  outline: 0;
  background-image: none;
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
  cursor: not-allowed;
  opacity: 0.65;
  filter: alpha(opacity=65);
  -webkit-box-shadow: none;
  box-shadow: none;
}
a.btn.disabled,
fieldset[disabled] a.btn {
  pointer-events: none;
}
.btn-default {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}
.btn-default:focus,
.btn-default.focus {
  color: #333;
  background-color: #e6e6e6;
  border-color: #8c8c8c;
}
.btn-default:hover {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.btn-default:active:hover,
.btn-default.active:hover,
.open > .dropdown-toggle.btn-default:hover,
.btn-default:active:focus,
.btn-default.active:focus,
.open > .dropdown-toggle.btn-default:focus,
.btn-default:active.focus,
.btn-default.active.focus,
.open > .dropdown-toggle.btn-default.focus {
  color: #333;
  background-color: #d4d4d4;
  border-color: #8c8c8c;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
  background-image: none;
}
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled.focus,
.btn-default[disabled].focus,
fieldset[disabled] .btn-default.focus {
  background-color: #fff;
  border-color: #ccc;
}
.btn-default .badge {
  color: #fff;
  background-color: #333;
}
.btn-primary {
  color: #fff;
  background-color: #337ab7;
  border-color: #2e6da4;
}
.btn-primary:focus,
.btn-primary.focus {
  color: #fff;
  background-color: #286090;
  border-color: #122b40;
}
.btn-primary:hover {
  color: #fff;
  background-color: #286090;
  border-color: #204d74;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
  color: #fff;
  background-color: #286090;
  border-color: #204d74;
}
.btn-primary:active:hover,
.btn-primary.active:hover,
.open > .dropdown-toggle.btn-primary:hover,
.btn-primary:active:focus,
.btn-primary.active:focus,
.open > .dropdown-toggle.btn-primary:focus,
.btn-primary:active.focus,
.btn-primary.active.focus,
.open > .dropdown-toggle.btn-primary.focus {
  color: #fff;
  background-color: #204d74;
  border-color: #122b40;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
  background-image: none;
}
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled.focus,
.btn-primary[disabled].focus,
fieldset[disabled] .btn-primary.focus {
  background-color: #337ab7;
  border-color: #2e6da4;
}
.btn-primary .badge {
  color: #337ab7;
  background-color: #fff;
}
.btn-success {
  color: #fff;
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.btn-success:focus,
.btn-success.focus {
  color: #fff;
  background-color: #449d44;
  border-color: #255625;
}
.btn-success:hover {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}
.btn-success:active:hover,
.btn-success.active:hover,
.open > .dropdown-toggle.btn-success:hover,
.btn-success:active:focus,
.btn-success.active:focus,
.open > .dropdown-toggle.btn-success:focus,
.btn-success:active.focus,
.btn-success.active.focus,
.open > .dropdown-toggle.btn-success.focus {
  color: #fff;
  background-color: #398439;
  border-color: #255625;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
  background-image: none;
}
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled.focus,
.btn-success[disabled].focus,
fieldset[disabled] .btn-success.focus {
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.btn-success .badge {
  color: #5cb85c;
  background-color: #fff;
}
.btn-info {
  color: #fff;
  background-color: #5bc0de;
  border-color: #46b8da;
}
.btn-info:focus,
.btn-info.focus {
  color: #fff;
  background-color: #31b0d5;
  border-color: #1b6d85;
}
.btn-info:hover {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}
.btn-info:active:hover,
.btn-info.active:hover,
.open > .dropdown-toggle.btn-info:hover,
.btn-info:active:focus,
.btn-info.active:focus,
.open > .dropdown-toggle.btn-info:focus,
.btn-info:active.focus,
.btn-info.active.focus,
.open > .dropdown-toggle.btn-info.focus {
  color: #fff;
  background-color: #269abc;
  border-color: #1b6d85;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
  background-image: none;
}
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled.focus,
.btn-info[disabled].focus,
fieldset[disabled] .btn-info.focus {
  background-color: #5bc0de;
  border-color: #46b8da;
}
.btn-info .badge {
  color: #5bc0de;
  background-color: #fff;
}
.btn-warning {
  color: #fff;
  background-color: #f0ad4e;
  border-color: #eea236;
}
.btn-warning:focus,
.btn-warning.focus {
  color: #fff;
  background-color: #ec971f;
  border-color: #985f0d;
}
.btn-warning:hover {
  color: #fff;
  background-color: #ec971f;
  border-color: #d58512;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
  color: #fff;
  background-color: #ec971f;
  border-color: #d58512;
}
.btn-warning:active:hover,
.btn-warning.active:hover,
.open > .dropdown-toggle.btn-warning:hover,
.btn-warning:active:focus,
.btn-warning.active:focus,
.open > .dropdown-toggle.btn-warning:focus,
.btn-warning:active.focus,
.btn-warning.active.focus,
.open > .dropdown-toggle.btn-warning.focus {
  color: #fff;
  background-color: #d58512;
  border-color: #985f0d;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
  background-image: none;
}
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled.focus,
.btn-warning[disabled].focus,
fieldset[disabled] .btn-warning.focus {
  background-color: #f0ad4e;
  border-color: #eea236;
}
.btn-warning .badge {
  color: #f0ad4e;
  background-color: #fff;
}
.btn-danger {
  color: #fff;
  background-color: #d9534f;
  border-color: #d43f3a;
}
.btn-danger:focus,
.btn-danger.focus {
  color: #fff;
  background-color: #c9302c;
  border-color: #761c19;
}
.btn-danger:hover {
  color: #fff;
  background-color: #c9302c;
  border-color: #ac2925;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
  color: #fff;
  background-color: #c9302c;
  border-color: #ac2925;
}
.btn-danger:active:hover,
.btn-danger.active:hover,
.open > .dropdown-toggle.btn-danger:hover,
.btn-danger:active:focus,
.btn-danger.active:focus,
.open > .dropdown-toggle.btn-danger:focus,
.btn-danger:active.focus,
.btn-danger.active.focus,
.open > .dropdown-toggle.btn-danger.focus {
  color: #fff;
  background-color: #ac2925;
  border-color: #761c19;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
  background-image: none;
}
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled.focus,
.btn-danger[disabled].focus,
fieldset[disabled] .btn-danger.focus {
  background-color: #d9534f;
  border-color: #d43f3a;
}
.btn-danger .badge {
  color: #d9534f;
  background-color: #fff;
}
.btn-link {
  color: #337ab7;
  font-weight: normal;
  border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link.active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
  background-color: transparent;
  -webkit-box-shadow: none;
  box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
  border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
  color: #23527c;
  text-decoration: underline;
  background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
  color: #777777;
  text-decoration: none;
}
.btn-lg,
.btn-group-lg > .btn {
  padding: 10px 16px;
  font-size: 17px;
  line-height: 1.3333333;
  border-radius: 3px;
}
.btn-sm,
.btn-group-sm > .btn {
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 1px;
}
.btn-xs,
.btn-group-xs > .btn {
  padding: 1px 5px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 1px;
}
.btn-block {
  display: block;
  width: 100%;
}
.btn-block + .btn-block {
  margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
  width: 100%;
}
.fade {
  opacity: 0;
  -webkit-transition: opacity 0.15s linear;
  -o-transition: opacity 0.15s linear;
  transition: opacity 0.15s linear;
}
.fade.in {
  opacity: 1;
}
.collapse {
  display: none;
}
.collapse.in {
  display: block;
}
tr.collapse.in {
  display: table-row;
}
tbody.collapse.in {
  display: table-row-group;
}
.collapsing {
  position: relative;
  height: 0;
  overflow: hidden;
  -webkit-transition-property: height, visibility;
  transition-property: height, visibility;
  -webkit-transition-duration: 0.35s;
  transition-duration: 0.35s;
  -webkit-transition-timing-function: ease;
  transition-timing-function: ease;
}
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top: 4px dashed;
  border-top: 4px solid \9;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
}
.dropup,
.dropdown {
  position: relative;
}
.dropdown-toggle:focus {
  outline: 0;
}
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  float: left;
  min-width: 160px;
  padding: 5px 0;
  margin: 2px 0 0;
  list-style: none;
  font-size: 13px;
  text-align: left;
  background-color: #fff;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  background-clip: padding-box;
}
.dropdown-menu.pull-right {
  right: 0;
  left: auto;
}
.dropdown-menu .divider {
  height: 1px;
  margin: 8px 0;
  overflow: hidden;
  background-color: #e5e5e5;
}
.dropdown-menu > li > a {
  display: block;
  padding: 3px 20px;
  clear: both;
  font-weight: normal;
  line-height: 1.42857143;
  color: #333333;
  white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  text-decoration: none;
  color: #262626;
  background-color: #f5f5f5;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
  color: #fff;
  text-decoration: none;
  outline: 0;
  background-color: #337ab7;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
  color: #777777;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
  text-decoration: none;
  background-color: transparent;
  background-image: none;
  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
  cursor: not-allowed;
}
.open > .dropdown-menu {
  display: block;
}
.open > a {
  outline: 0;
}
.dropdown-menu-right {
  left: auto;
  right: 0;
}
.dropdown-menu-left {
  left: 0;
  right: auto;
}
.dropdown-header {
  display: block;
  padding: 3px 20px;
  font-size: 12px;
  line-height: 1.42857143;
  color: #777777;
  white-space: nowrap;
}
.dropdown-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  z-index: 990;
}
.pull-right > .dropdown-menu {
  right: 0;
  left: auto;
}
.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
  border-top: 0;
  border-bottom: 4px dashed;
  border-bottom: 4px solid \9;
  content: "";
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
  top: auto;
  bottom: 100%;
  margin-bottom: 2px;
}
@media (min-width: 541px) {
  .navbar-right .dropdown-menu {
    left: auto;
    right: 0;
  }
  .navbar-right .dropdown-menu-left {
    left: 0;
    right: auto;
  }
}
.btn-group,
.btn-group-vertical {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}
.btn-group > .btn,
.btn-group-vertical > .btn {
  position: relative;
  float: left;
}
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover,
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus,
.btn-group > .btn:active,
.btn-group-vertical > .btn:active,
.btn-group > .btn.active,
.btn-group-vertical > .btn.active {
  z-index: 2;
}
.btn-group .btn + .btn,
.btn-group .btn + .btn-group,
.btn-group .btn-group + .btn,
.btn-group .btn-group + .btn-group {
  margin-left: -1px;
}
.btn-toolbar {
  margin-left: -5px;
}
.btn-toolbar .btn,
.btn-toolbar .btn-group,
.btn-toolbar .input-group {
  float: left;
}
.btn-toolbar > .btn,
.btn-toolbar > .btn-group,
.btn-toolbar > .input-group {
  margin-left: 5px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
  border-radius: 0;
}
.btn-group > .btn:first-child {
  margin-left: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}
.btn-group > .btn-group {
  float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
  border-radius: 0;
}
.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}
.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
  outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
  padding-left: 8px;
  padding-right: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
  padding-left: 12px;
  padding-right: 12px;
}
.btn-group.open .dropdown-toggle {
  -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn-group.open .dropdown-toggle.btn-link {
  -webkit-box-shadow: none;
  box-shadow: none;
}
.btn .caret {
  margin-left: 0;
}
.btn-lg .caret {
  border-width: 5px 5px 0;
  border-bottom-width: 0;
}
.dropup .btn-lg .caret {
  border-width: 0 5px 5px;
}
.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group,
.btn-group-vertical > .btn-group > .btn {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
}
.btn-group-vertical > .btn-group > .btn {
  float: none;
}
.btn-group-vertical > .btn + .btn,
.btn-group-vertical > .btn + .btn-group,
.btn-group-vertical > .btn-group + .btn,
.btn-group-vertical > .btn-group + .btn-group {
  margin-top: -1px;
  margin-left: 0;
}
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
  border-radius: 0;
}
.btn-group-vertical > .btn:first-child:not(:last-child) {
  border-top-right-radius: 2px;
  border-top-left-radius: 2px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.btn-group-vertical > .btn:last-child:not(:first-child) {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  border-bottom-right-radius: 2px;
  border-bottom-left-radius: 2px;
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
  border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
.btn-group-justified {
  display: table;
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
}
.btn-group-justified > .btn,
.btn-group-justified > .btn-group {
  float: none;
  display: table-cell;
  width: 1%;
}
.btn-group-justified > .btn-group .btn {
  width: 100%;
}
.btn-group-justified > .btn-group .dropdown-menu {
  left: auto;
}
[data-toggle="buttons"] > .btn input[type="radio"],
[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
[data-toggle="buttons"] > .btn input[type="checkbox"],
[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}
.input-group {
  position: relative;
  display: table;
  border-collapse: separate;
}
.input-group[class*="col-"] {
  float: none;
  padding-left: 0;
  padding-right: 0;
}
.input-group .form-control {
  position: relative;
  z-index: 2;
  float: left;
  width: 100%;
  margin-bottom: 0;
}
.input-group .form-control:focus {
  z-index: 3;
}
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
  height: 45px;
  padding: 10px 16px;
  font-size: 17px;
  line-height: 1.3333333;
  border-radius: 3px;
}
select.input-group-lg > .form-control,
select.input-group-lg > .input-group-addon,
select.input-group-lg > .input-group-btn > .btn {
  height: 45px;
  line-height: 45px;
}
textarea.input-group-lg > .form-control,
textarea.input-group-lg > .input-group-addon,
textarea.input-group-lg > .input-group-btn > .btn,
select[multiple].input-group-lg > .form-control,
select[multiple].input-group-lg > .input-group-addon,
select[multiple].input-group-lg > .input-group-btn > .btn {
  height: auto;
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
  height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 1px;
}
select.input-group-sm > .form-control,
select.input-group-sm > .input-group-addon,
select.input-group-sm > .input-group-btn > .btn {
  height: 30px;
  line-height: 30px;
}
textarea.input-group-sm > .form-control,
textarea.input-group-sm > .input-group-addon,
textarea.input-group-sm > .input-group-btn > .btn,
select[multiple].input-group-sm > .form-control,
select[multiple].input-group-sm > .input-group-addon,
select[multiple].input-group-sm > .input-group-btn > .btn {
  height: auto;
}
.input-group-addon,
.input-group-btn,
.input-group .form-control {
  display: table-cell;
}
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child) {
  border-radius: 0;
}
.input-group-addon,
.input-group-btn {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}
.input-group-addon {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: normal;
  line-height: 1;
  color: #555555;
  text-align: center;
  background-color: #eeeeee;
  border: 1px solid #ccc;
  border-radius: 2px;
}
.input-group-addon.input-sm {
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 1px;
}
.input-group-addon.input-lg {
  padding: 10px 16px;
  font-size: 17px;
  border-radius: 3px;
}
.input-group-addon input[type="radio"],
.input-group-addon input[type="checkbox"] {
  margin-top: 0;
}
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}
.input-group-addon:first-child {
  border-right: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}
.input-group-addon:last-child {
  border-left: 0;
}
.input-group-btn {
  position: relative;
  font-size: 0;
  white-space: nowrap;
}
.input-group-btn > .btn {
  position: relative;
}
.input-group-btn > .btn + .btn {
  margin-left: -1px;
}
.input-group-btn > .btn:hover,
.input-group-btn > .btn:focus,
.input-group-btn > .btn:active {
  z-index: 2;
}
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group {
  margin-right: -1px;
}
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
  z-index: 2;
  margin-left: -1px;
}
.nav {
  margin-bottom: 0;
  padding-left: 0;
  list-style: none;
}
.nav > li {
  position: relative;
  display: block;
}
.nav > li > a {
  position: relative;
  display: block;
  padding: 10px 15px;
}
.nav > li > a:hover,
.nav > li > a:focus {
  text-decoration: none;
  background-color: #eeeeee;
}
.nav > li.disabled > a {
  color: #777777;
}
.nav > li.disabled > a:hover,
.nav > li.disabled > a:focus {
  color: #777777;
  text-decoration: none;
  background-color: transparent;
  cursor: not-allowed;
}
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
  background-color: #eeeeee;
  border-color: #337ab7;
}
.nav .nav-divider {
  height: 1px;
  margin: 8px 0;
  overflow: hidden;
  background-color: #e5e5e5;
}
.nav > li > a > img {
  max-width: none;
}
.nav-tabs {
  border-bottom: 1px solid #ddd;
}
.nav-tabs > li {
  float: left;
  margin-bottom: -1px;
}
.nav-tabs > li > a {
  margin-right: 2px;
  line-height: 1.42857143;
  border: 1px solid transparent;
  border-radius: 2px 2px 0 0;
}
.nav-tabs > li > a:hover {
  border-color: #eeeeee #eeeeee #ddd;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: #555555;
  background-color: #fff;
  border: 1px solid #ddd;
  border-bottom-color: transparent;
  cursor: default;
}
.nav-tabs.nav-justified {
  width: 100%;
  border-bottom: 0;
}
.nav-tabs.nav-justified > li {
  float: none;
}
.nav-tabs.nav-justified > li > a {
  text-align: center;
  margin-bottom: 5px;
}
.nav-tabs.nav-justified > .dropdown .dropdown-menu {
  top: auto;
  left: auto;
}
@media (min-width: 768px) {
  .nav-tabs.nav-justified > li {
    display: table-cell;
    width: 1%;
  }
  .nav-tabs.nav-justified > li > a {
    margin-bottom: 0;
  }
}
.nav-tabs.nav-justified > li > a {
  margin-right: 0;
  border-radius: 2px;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
  border: 1px solid #ddd;
}
@media (min-width: 768px) {
  .nav-tabs.nav-justified > li > a {
    border-bottom: 1px solid #ddd;
    border-radius: 2px 2px 0 0;
  }
  .nav-tabs.nav-justified > .active > a,
  .nav-tabs.nav-justified > .active > a:hover,
  .nav-tabs.nav-justified > .active > a:focus {
    border-bottom-color: #fff;
  }
}
.nav-pills > li {
  float: left;
}
.nav-pills > li > a {
  border-radius: 2px;
}
.nav-pills > li + li {
  margin-left: 2px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
  color: #fff;
  background-color: #337ab7;
}
.nav-stacked > li {
  float: none;
}
.nav-stacked > li + li {
  margin-top: 2px;
  margin-left: 0;
}
.nav-justified {
  width: 100%;
}
.nav-justified > li {
  float: none;
}
.nav-justified > li > a {
  text-align: center;
  margin-bottom: 5px;
}
.nav-justified > .dropdown .dropdown-menu {
  top: auto;
  left: auto;
}
@media (min-width: 768px) {
  .nav-justified > li {
    display: table-cell;
    width: 1%;
  }
  .nav-justified > li > a {
    margin-bottom: 0;
  }
}
.nav-tabs-justified {
  border-bottom: 0;
}
.nav-tabs-justified > li > a {
  margin-right: 0;
  border-radius: 2px;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
  border: 1px solid #ddd;
}
@media (min-width: 768px) {
  .nav-tabs-justified > li > a {
    border-bottom: 1px solid #ddd;
    border-radius: 2px 2px 0 0;
  }
  .nav-tabs-justified > .active > a,
  .nav-tabs-justified > .active > a:hover,
  .nav-tabs-justified > .active > a:focus {
    border-bottom-color: #fff;
  }
}
.tab-content > .tab-pane {
  display: none;
}
.tab-content > .active {
  display: block;
}
.nav-tabs .dropdown-menu {
  margin-top: -1px;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
.navbar {
  position: relative;
  min-height: 30px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
@media (min-width: 541px) {
  .navbar {
    border-radius: 2px;
  }
}
@media (min-width: 541px) {
  .navbar-header {
    float: left;
  }
}
.navbar-collapse {
  overflow-x: visible;
  padding-right: 0px;
  padding-left: 0px;
  border-top: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  -webkit-overflow-scrolling: touch;
}
.navbar-collapse.in {
  overflow-y: auto;
}
@media (min-width: 541px) {
  .navbar-collapse {
    width: auto;
    border-top: 0;
    box-shadow: none;
  }
  .navbar-collapse.collapse {
    display: block !important;
    height: auto !important;
    padding-bottom: 0;
    overflow: visible !important;
  }
  .navbar-collapse.in {
    overflow-y: visible;
  }
  .navbar-fixed-top .navbar-collapse,
  .navbar-static-top .navbar-collapse,
  .navbar-fixed-bottom .navbar-collapse {
    padding-left: 0;
    padding-right: 0;
  }
}
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
  max-height: 340px;
}
@media (max-device-width: 540px) and (orientation: landscape) {
  .navbar-fixed-top .navbar-collapse,
  .navbar-fixed-bottom .navbar-collapse {
    max-height: 200px;
  }
}
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
  margin-right: 0px;
  margin-left: 0px;
}
@media (min-width: 541px) {
  .container > .navbar-header,
  .container-fluid > .navbar-header,
  .container > .navbar-collapse,
  .container-fluid > .navbar-collapse {
    margin-right: 0;
    margin-left: 0;
  }
}
.navbar-static-top {
  z-index: 1000;
  border-width: 0 0 1px;
}
@media (min-width: 541px) {
  .navbar-static-top {
    border-radius: 0;
  }
}
.navbar-fixed-top,
.navbar-fixed-bottom {
  position: fixed;
  right: 0;
  left: 0;
  z-index: 1030;
}
@media (min-width: 541px) {
  .navbar-fixed-top,
  .navbar-fixed-bottom {
    border-radius: 0;
  }
}
.navbar-fixed-top {
  top: 0;
  border-width: 0 0 1px;
}
.navbar-fixed-bottom {
  bottom: 0;
  margin-bottom: 0;
  border-width: 1px 0 0;
}
.navbar-brand {
  float: left;
  padding: 6px 0px;
  font-size: 17px;
  line-height: 18px;
  height: 30px;
}
.navbar-brand:hover,
.navbar-brand:focus {
  text-decoration: none;
}
.navbar-brand > img {
  display: block;
}
@media (min-width: 541px) {
  .navbar > .container .navbar-brand,
  .navbar > .container-fluid .navbar-brand {
    margin-left: 0px;
  }
}
.navbar-toggle {
  position: relative;
  float: right;
  margin-right: 0px;
  padding: 9px 10px;
  margin-top: -2px;
  margin-bottom: -2px;
  background-color: transparent;
  background-image: none;
  border: 1px solid transparent;
  border-radius: 2px;
}
.navbar-toggle:focus {
  outline: 0;
}
.navbar-toggle .icon-bar {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar {
  margin-top: 4px;
}
@media (min-width: 541px) {
  .navbar-toggle {
    display: none;
  }
}
.navbar-nav {
  margin: 3px 0px;
}
.navbar-nav > li > a {
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 18px;
}
@media (max-width: 540px) {
  .navbar-nav .open .dropdown-menu {
    position: static;
    float: none;
    width: auto;
    margin-top: 0;
    background-color: transparent;
    border: 0;
    box-shadow: none;
  }
  .navbar-nav .open .dropdown-menu > li > a,
  .navbar-nav .open .dropdown-menu .dropdown-header {
    padding: 5px 15px 5px 25px;
  }
  .navbar-nav .open .dropdown-menu > li > a {
    line-height: 18px;
  }
  .navbar-nav .open .dropdown-menu > li > a:hover,
  .navbar-nav .open .dropdown-menu > li > a:focus {
    background-image: none;
  }
}
@media (min-width: 541px) {
  .navbar-nav {
    float: left;
    margin: 0;
  }
  .navbar-nav > li {
    float: left;
  }
  .navbar-nav > li > a {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}
.navbar-form {
  margin-left: 0px;
  margin-right: 0px;
  padding: 10px 0px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid transparent;
  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
  margin-top: -1px;
  margin-bottom: -1px;
}
@media (min-width: 768px) {
  .navbar-form .form-group {
    display: inline-block;
    margin-bottom: 0;
    vertical-align: middle;
  }
  .navbar-form .form-control {
    display: inline-block;
    width: auto;
    vertical-align: middle;
  }
  .navbar-form .form-control-static {
    display: inline-block;
  }
  .navbar-form .input-group {
    display: inline-table;
    vertical-align: middle;
  }
  .navbar-form .input-group .input-group-addon,
  .navbar-form .input-group .input-group-btn,
  .navbar-form .input-group .form-control {
    width: auto;
  }
  .navbar-form .input-group > .form-control {
    width: 100%;
  }
  .navbar-form .control-label {
    margin-bottom: 0;
    vertical-align: middle;
  }
  .navbar-form .radio,
  .navbar-form .checkbox {
    display: inline-block;
    margin-top: 0;
    margin-bottom: 0;
    vertical-align: middle;
  }
  .navbar-form .radio label,
  .navbar-form .checkbox label {
    padding-left: 0;
  }
  .navbar-form .radio input[type="radio"],
  .navbar-form .checkbox input[type="checkbox"] {
    position: relative;
    margin-left: 0;
  }
  .navbar-form .has-feedback .form-control-feedback {
    top: 0;
  }
}
@media (max-width: 540px) {
  .navbar-form .form-group {
    margin-bottom: 5px;
  }
  .navbar-form .form-group:last-child {
    margin-bottom: 0;
  }
}
@media (min-width: 541px) {
  .navbar-form {
    width: auto;
    border: 0;
    margin-left: 0;
    margin-right: 0;
    padding-top: 0;
    padding-bottom: 0;
    -webkit-box-shadow: none;
    box-shadow: none;
  }
}
.navbar-nav > li > .dropdown-menu {
  margin-top: 0;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
  margin-bottom: 0;
  border-top-right-radius: 2px;
  border-top-left-radius: 2px;
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.navbar-btn {
  margin-top: -1px;
  margin-bottom: -1px;
}
.navbar-btn.btn-sm {
  margin-top: 0px;
  margin-bottom: 0px;
}
.navbar-btn.btn-xs {
  margin-top: 4px;
  margin-bottom: 4px;
}
.navbar-text {
  margin-top: 6px;
  margin-bottom: 6px;
}
@media (min-width: 541px) {
  .navbar-text {
    float: left;
    margin-left: 0px;
    margin-right: 0px;
  }
}
@media (min-width: 541px) {
  .navbar-left {
    float: left !important;
    float: left;
  }
  .navbar-right {
    float: right !important;
    float: right;
    margin-right: 0px;
  }
  .navbar-right ~ .navbar-right {
    margin-right: 0;
  }
}
.navbar-default {
  background-color: #f8f8f8;
  border-color: #e7e7e7;
}
.navbar-default .navbar-brand {
  color: #777;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
  color: #5e5e5e;
  background-color: transparent;
}
.navbar-default .navbar-text {
  color: #777;
}
.navbar-default .navbar-nav > li > a {
  color: #777;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
  color: #333;
  background-color: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  color: #555;
  background-color: #e7e7e7;
}
.navbar-default .navbar-nav > .disabled > a,
.navbar-default .navbar-nav > .disabled > a:hover,
.navbar-default .navbar-nav > .disabled > a:focus {
  color: #ccc;
  background-color: transparent;
}
.navbar-default .navbar-toggle {
  border-color: #ddd;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  background-color: #ddd;
}
.navbar-default .navbar-toggle .icon-bar {
  background-color: #888;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
  border-color: #e7e7e7;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
  background-color: #e7e7e7;
  color: #555;
}
@media (max-width: 540px) {
  .navbar-default .navbar-nav .open .dropdown-menu > li > a {
    color: #777;
  }
  .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
  .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
    color: #333;
    background-color: transparent;
  }
  .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
  .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
    color: #555;
    background-color: #e7e7e7;
  }
  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
  .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
    color: #ccc;
    background-color: transparent;
  }
}
.navbar-default .navbar-link {
  color: #777;
}
.navbar-default .navbar-link:hover {
  color: #333;
}
.navbar-default .btn-link {
  color: #777;
}
.navbar-default .btn-link:hover,
.navbar-default .btn-link:focus {
  color: #333;
}
.navbar-default .btn-link[disabled]:hover,
fieldset[disabled] .navbar-default .btn-link:hover,
.navbar-default .btn-link[disabled]:focus,
fieldset[disabled] .navbar-default .btn-link:focus {
  color: #ccc;
}
.navbar-inverse {
  background-color: #222;
  border-color: #080808;
}
.navbar-inverse .navbar-brand {
  color: #9d9d9d;
}
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
  color: #fff;
  background-color: transparent;
}
.navbar-inverse .navbar-text {
  color: #9d9d9d;
}
.navbar-inverse .navbar-nav > li > a {
  color: #9d9d9d;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
  color: #fff;
  background-color: transparent;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
  color: #fff;
  background-color: #080808;
}
.navbar-inverse .navbar-nav > .disabled > a,
.navbar-inverse .navbar-nav > .disabled > a:hover,
.navbar-inverse .navbar-nav > .disabled > a:focus {
  color: #444;
  background-color: transparent;
}
.navbar-inverse .navbar-toggle {
  border-color: #333;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
  background-color: #333;
}
.navbar-inverse .navbar-toggle .icon-bar {
  background-color: #fff;
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
  border-color: #101010;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
  background-color: #080808;
  color: #fff;
}
@media (max-width: 540px) {
  .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
    border-color: #080808;
  }
  .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
    background-color: #080808;
  }
  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
    color: #9d9d9d;
  }
  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
  .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
    color: #fff;
    background-color: transparent;
  }
  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
    color: #fff;
    background-color: #080808;
  }
  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
  .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
    color: #444;
    background-color: transparent;
  }
}
.navbar-inverse .navbar-link {
  color: #9d9d9d;
}
.navbar-inverse .navbar-link:hover {
  color: #fff;
}
.navbar-inverse .btn-link {
  color: #9d9d9d;
}
.navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link:focus {
  color: #fff;
}
.navbar-inverse .btn-link[disabled]:hover,
fieldset[disabled] .navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link[disabled]:focus,
fieldset[disabled] .navbar-inverse .btn-link:focus {
  color: #444;
}
.breadcrumb {
  padding: 8px 15px;
  margin-bottom: 18px;
  list-style: none;
  background-color: #f5f5f5;
  border-radius: 2px;
}
.breadcrumb > li {
  display: inline-block;
}
.breadcrumb > li + li:before {
  content: "/\00a0";
  padding: 0 5px;
  color: #5e5e5e;
}
.breadcrumb > .active {
  color: #777777;
}
.pagination {
  display: inline-block;
  padding-left: 0;
  margin: 18px 0;
  border-radius: 2px;
}
.pagination > li {
  display: inline;
}
.pagination > li > a,
.pagination > li > span {
  position: relative;
  float: left;
  padding: 6px 12px;
  line-height: 1.42857143;
  text-decoration: none;
  color: #337ab7;
  background-color: #fff;
  border: 1px solid #ddd;
  margin-left: -1px;
}
.pagination > li:first-child > a,
.pagination > li:first-child > span {
  margin-left: 0;
  border-bottom-left-radius: 2px;
  border-top-left-radius: 2px;
}
.pagination > li:last-child > a,
.pagination > li:last-child > span {
  border-bottom-right-radius: 2px;
  border-top-right-radius: 2px;
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
  z-index: 2;
  color: #23527c;
  background-color: #eeeeee;
  border-color: #ddd;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
  z-index: 3;
  color: #fff;
  background-color: #337ab7;
  border-color: #337ab7;
  cursor: default;
}
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
  color: #777777;
  background-color: #fff;
  border-color: #ddd;
  cursor: not-allowed;
}
.pagination-lg > li > a,
.pagination-lg > li > span {
  padding: 10px 16px;
  font-size: 17px;
  line-height: 1.3333333;
}
.pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span {
  border-bottom-left-radius: 3px;
  border-top-left-radius: 3px;
}
.pagination-lg > li:last-child > a,
.pagination-lg > li:last-child > span {
  border-bottom-right-radius: 3px;
  border-top-right-radius: 3px;
}
.pagination-sm > li > a,
.pagination-sm > li > span {
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
}
.pagination-sm > li:first-child > a,
.pagination-sm > li:first-child > span {
  border-bottom-left-radius: 1px;
  border-top-left-radius: 1px;
}
.pagination-sm > li:last-child > a,
.pagination-sm > li:last-child > span {
  border-bottom-right-radius: 1px;
  border-top-right-radius: 1px;
}
.pager {
  padding-left: 0;
  margin: 18px 0;
  list-style: none;
  text-align: center;
}
.pager li {
  display: inline;
}
.pager li > a,
.pager li > span {
  display: inline-block;
  padding: 5px 14px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 15px;
}
.pager li > a:hover,
.pager li > a:focus {
  text-decoration: none;
  background-color: #eeeeee;
}
.pager .next > a,
.pager .next > span {
  float: right;
}
.pager .previous > a,
.pager .previous > span {
  float: left;
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
  color: #777777;
  background-color: #fff;
  cursor: not-allowed;
}
.label {
  display: inline;
  padding: .2em .6em .3em;
  font-size: 75%;
  font-weight: bold;
  line-height: 1;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: .25em;
}
a.label:hover,
a.label:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.label:empty {
  display: none;
}
.btn .label {
  position: relative;
  top: -1px;
}
.label-default {
  background-color: #777777;
}
.label-default[href]:hover,
.label-default[href]:focus {
  background-color: #5e5e5e;
}
.label-primary {
  background-color: #337ab7;
}
.label-primary[href]:hover,
.label-primary[href]:focus {
  background-color: #286090;
}
.label-success {
  background-color: #5cb85c;
}
.label-success[href]:hover,
.label-success[href]:focus {
  background-color: #449d44;
}
.label-info {
  background-color: #5bc0de;
}
.label-info[href]:hover,
.label-info[href]:focus {
  background-color: #31b0d5;
}
.label-warning {
  background-color: #f0ad4e;
}
.label-warning[href]:hover,
.label-warning[href]:focus {
  background-color: #ec971f;
}
.label-danger {
  background-color: #d9534f;
}
.label-danger[href]:hover,
.label-danger[href]:focus {
  background-color: #c9302c;
}
.badge {
  display: inline-block;
  min-width: 10px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
  text-align: center;
  background-color: #777777;
  border-radius: 10px;
}
.badge:empty {
  display: none;
}
.btn .badge {
  position: relative;
  top: -1px;
}
.btn-xs .badge,
.btn-group-xs > .btn .badge {
  top: 0;
  padding: 1px 5px;
}
a.badge:hover,
a.badge:focus {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
  color: #337ab7;
  background-color: #fff;
}
.list-group-item > .badge {
  float: right;
}
.list-group-item > .badge + .badge {
  margin-right: 5px;
}
.nav-pills > li > a > .badge {
  margin-left: 3px;
}
.jumbotron {
  padding-top: 30px;
  padding-bottom: 30px;
  margin-bottom: 30px;
  color: inherit;
  background-color: #eeeeee;
}
.jumbotron h1,
.jumbotron .h1 {
  color: inherit;
}
.jumbotron p {
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 200;
}
.jumbotron > hr {
  border-top-color: #d5d5d5;
}
.container .jumbotron,
.container-fluid .jumbotron {
  border-radius: 3px;
  padding-left: 0px;
  padding-right: 0px;
}
.jumbotron .container {
  max-width: 100%;
}
@media screen and (min-width: 768px) {
  .jumbotron {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .container .jumbotron,
  .container-fluid .jumbotron {
    padding-left: 60px;
    padding-right: 60px;
  }
  .jumbotron h1,
  .jumbotron .h1 {
    font-size: 59px;
  }
}
.thumbnail {
  display: block;
  padding: 4px;
  margin-bottom: 18px;
  line-height: 1.42857143;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 2px;
  -webkit-transition: border 0.2s ease-in-out;
  -o-transition: border 0.2s ease-in-out;
  transition: border 0.2s ease-in-out;
}
.thumbnail > img,
.thumbnail a > img {
  margin-left: auto;
  margin-right: auto;
}
a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
  border-color: #337ab7;
}
.thumbnail .caption {
  padding: 9px;
  color: #000;
}
.alert {
  padding: 15px;
  margin-bottom: 18px;
  border: 1px solid transparent;
  border-radius: 2px;
}
.alert h4 {
  margin-top: 0;
  color: inherit;
}
.alert .alert-link {
  font-weight: bold;
}
.alert > p,
.alert > ul {
  margin-bottom: 0;
}
.alert > p + p {
  margin-top: 5px;
}
.alert-dismissable,
.alert-dismissible {
  padding-right: 35px;
}
.alert-dismissable .close,
.alert-dismissible .close {
  position: relative;
  top: -2px;
  right: -21px;
  color: inherit;
}
.alert-success {
  background-color: #dff0d8;
  border-color: #d6e9c6;
  color: #3c763d;
}
.alert-success hr {
  border-top-color: #c9e2b3;
}
.alert-success .alert-link {
  color: #2b542c;
}
.alert-info {
  background-color: #d9edf7;
  border-color: #bce8f1;
  color: #31708f;
}
.alert-info hr {
  border-top-color: #a6e1ec;
}
.alert-info .alert-link {
  color: #245269;
}
.alert-warning {
  background-color: #fcf8e3;
  border-color: #faebcc;
  color: #8a6d3b;
}
.alert-warning hr {
  border-top-color: #f7e1b5;
}
.alert-warning .alert-link {
  color: #66512c;
}
.alert-danger {
  background-color: #f2dede;
  border-color: #ebccd1;
  color: #a94442;
}
.alert-danger hr {
  border-top-color: #e4b9c0;
}
.alert-danger .alert-link {
  color: #843534;
}
@-webkit-keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}
@keyframes progress-bar-stripes {
  from {
    background-position: 40px 0;
  }
  to {
    background-position: 0 0;
  }
}
.progress {
  overflow: hidden;
  height: 18px;
  margin-bottom: 18px;
  background-color: #f5f5f5;
  border-radius: 2px;
  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.progress-bar {
  float: left;
  width: 0%;
  height: 100%;
  font-size: 12px;
  line-height: 18px;
  color: #fff;
  text-align: center;
  background-color: #337ab7;
  -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
  -webkit-transition: width 0.6s ease;
  -o-transition: width 0.6s ease;
  transition: width 0.6s ease;
}
.progress-striped .progress-bar,
.progress-bar-striped {
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 40px 40px;
}
.progress.active .progress-bar,
.progress-bar.active {
  -webkit-animation: progress-bar-stripes 2s linear infinite;
  -o-animation: progress-bar-stripes 2s linear infinite;
  animation: progress-bar-stripes 2s linear infinite;
}
.progress-bar-success {
  background-color: #5cb85c;
}
.progress-striped .progress-bar-success {
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-info {
  background-color: #5bc0de;
}
.progress-striped .progress-bar-info {
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-warning {
  background-color: #f0ad4e;
}
.progress-striped .progress-bar-warning {
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-danger {
  background-color: #d9534f;
}
.progress-striped .progress-bar-danger {
  background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.media {
  margin-top: 15px;
}
.media:first-child {
  margin-top: 0;
}
.media,
.media-body {
  zoom: 1;
  overflow: hidden;
}
.media-body {
  width: 10000px;
}
.media-object {
  display: block;
}
.media-object.img-thumbnail {
  max-width: none;
}
.media-right,
.media > .pull-right {
  padding-left: 10px;
}
.media-left,
.media > .pull-left {
  padding-right: 10px;
}
.media-left,
.media-right,
.media-body {
  display: table-cell;
  vertical-align: top;
}
.media-middle {
  vertical-align: middle;
}
.media-bottom {
  vertical-align: bottom;
}
.media-heading {
  margin-top: 0;
  margin-bottom: 5px;
}
.media-list {
  padding-left: 0;
  list-style: none;
}
.list-group {
  margin-bottom: 20px;
  padding-left: 0;
}
.list-group-item {
  position: relative;
  display: block;
  padding: 10px 15px;
  margin-bottom: -1px;
  background-color: #fff;
  border: 1px solid #ddd;
}
.list-group-item:first-child {
  border-top-right-radius: 2px;
  border-top-left-radius: 2px;
}
.list-group-item:last-child {
  margin-bottom: 0;
  border-bottom-right-radius: 2px;
  border-bottom-left-radius: 2px;
}
a.list-group-item,
button.list-group-item {
  color: #555;
}
a.list-group-item .list-group-item-heading,
button.list-group-item .list-group-item-heading {
  color: #333;
}
a.list-group-item:hover,
button.list-group-item:hover,
a.list-group-item:focus,
button.list-group-item:focus {
  text-decoration: none;
  color: #555;
  background-color: #f5f5f5;
}
button.list-group-item {
  width: 100%;
  text-align: left;
}
.list-group-item.disabled,
.list-group-item.disabled:hover,
.list-group-item.disabled:focus {
  background-color: #eeeeee;
  color: #777777;
  cursor: not-allowed;
}
.list-group-item.disabled .list-group-item-heading,
.list-group-item.disabled:hover .list-group-item-heading,
.list-group-item.disabled:focus .list-group-item-heading {
  color: inherit;
}
.list-group-item.disabled .list-group-item-text,
.list-group-item.disabled:hover .list-group-item-text,
.list-group-item.disabled:focus .list-group-item-text {
  color: #777777;
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
  z-index: 2;
  color: #fff;
  background-color: #337ab7;
  border-color: #337ab7;
}
.list-group-item.active .list-group-item-heading,
.list-group-item.active:hover .list-group-item-heading,
.list-group-item.active:focus .list-group-item-heading,
.list-group-item.active .list-group-item-heading > small,
.list-group-item.active:hover .list-group-item-heading > small,
.list-group-item.active:focus .list-group-item-heading > small,
.list-group-item.active .list-group-item-heading > .small,
.list-group-item.active:hover .list-group-item-heading > .small,
.list-group-item.active:focus .list-group-item-heading > .small {
  color: inherit;
}
.list-group-item.active .list-group-item-text,
.list-group-item.active:hover .list-group-item-text,
.list-group-item.active:focus .list-group-item-text {
  color: #c7ddef;
}
.list-group-item-success {
  color: #3c763d;
  background-color: #dff0d8;
}
a.list-group-item-success,
button.list-group-item-success {
  color: #3c763d;
}
a.list-group-item-success .list-group-item-heading,
button.list-group-item-success .list-group-item-heading {
  color: inherit;
}
a.list-group-item-success:hover,
button.list-group-item-success:hover,
a.list-group-item-success:focus,
button.list-group-item-success:focus {
  color: #3c763d;
  background-color: #d0e9c6;
}
a.list-group-item-success.active,
button.list-group-item-success.active,
a.list-group-item-success.active:hover,
button.list-group-item-success.active:hover,
a.list-group-item-success.active:focus,
button.list-group-item-success.active:focus {
  color: #fff;
  background-color: #3c763d;
  border-color: #3c763d;
}
.list-group-item-info {
  color: #31708f;
  background-color: #d9edf7;
}
a.list-group-item-info,
button.list-group-item-info {
  color: #31708f;
}
a.list-group-item-info .list-group-item-heading,
button.list-group-item-info .list-group-item-heading {
  color: inherit;
}
a.list-group-item-info:hover,
button.list-group-item-info:hover,
a.list-group-item-info:focus,
button.list-group-item-info:focus {
  color: #31708f;
  background-color: #c4e3f3;
}
a.list-group-item-info.active,
button.list-group-item-info.active,
a.list-group-item-info.active:hover,
button.list-group-item-info.active:hover,
a.list-group-item-info.active:focus,
button.list-group-item-info.active:focus {
  color: #fff;
  background-color: #31708f;
  border-color: #31708f;
}
.list-group-item-warning {
  color: #8a6d3b;
  background-color: #fcf8e3;
}
a.list-group-item-warning,
button.list-group-item-warning {
  color: #8a6d3b;
}
a.list-group-item-warning .list-group-item-heading,
button.list-group-item-warning .list-group-item-heading {
  color: inherit;
}
a.list-group-item-warning:hover,
button.list-group-item-warning:hover,
a.list-group-item-warning:focus,
button.list-group-item-warning:focus {
  color: #8a6d3b;
  background-color: #faf2cc;
}
a.list-group-item-warning.active,
button.list-group-item-warning.active,
a.list-group-item-warning.active:hover,
button.list-group-item-warning.active:hover,
a.list-group-item-warning.active:focus,
button.list-group-item-warning.active:focus {
  color: #fff;
  background-color: #8a6d3b;
  border-color: #8a6d3b;
}
.list-group-item-danger {
  color: #a94442;
  background-color: #f2dede;
}
a.list-group-item-danger,
button.list-group-item-danger {
  color: #a94442;
}
a.list-group-item-danger .list-group-item-heading,
button.list-group-item-danger .list-group-item-heading {
  color: inherit;
}
a.list-group-item-danger:hover,
button.list-group-item-danger:hover,
a.list-group-item-danger:focus,
button.list-group-item-danger:focus {
  color: #a94442;
  background-color: #ebcccc;
}
a.list-group-item-danger.active,
button.list-group-item-danger.active,
a.list-group-item-danger.active:hover,
button.list-group-item-danger.active:hover,
a.list-group-item-danger.active:focus,
button.list-group-item-danger.active:focus {
  color: #fff;
  background-color: #a94442;
  border-color: #a94442;
}
.list-group-item-heading {
  margin-top: 0;
  margin-bottom: 5px;
}
.list-group-item-text {
  margin-bottom: 0;
  line-height: 1.3;
}
.panel {
  margin-bottom: 18px;
  background-color: #fff;
  border: 1px solid transparent;
  border-radius: 2px;
  -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.panel-body {
  padding: 15px;
}
.panel-heading {
  padding: 10px 15px;
  border-bottom: 1px solid transparent;
  border-top-right-radius: 1px;
  border-top-left-radius: 1px;
}
.panel-heading > .dropdown .dropdown-toggle {
  color: inherit;
}
.panel-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: 15px;
  color: inherit;
}
.panel-title > a,
.panel-title > small,
.panel-title > .small,
.panel-title > small > a,
.panel-title > .small > a {
  color: inherit;
}
.panel-footer {
  padding: 10px 15px;
  background-color: #f5f5f5;
  border-top: 1px solid #ddd;
  border-bottom-right-radius: 1px;
  border-bottom-left-radius: 1px;
}
.panel > .list-group,
.panel > .panel-collapse > .list-group {
  margin-bottom: 0;
}
.panel > .list-group .list-group-item,
.panel > .panel-collapse > .list-group .list-group-item {
  border-width: 1px 0;
  border-radius: 0;
}
.panel > .list-group:first-child .list-group-item:first-child,
.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
  border-top: 0;
  border-top-right-radius: 1px;
  border-top-left-radius: 1px;
}
.panel > .list-group:last-child .list-group-item:last-child,
.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
  border-bottom: 0;
  border-bottom-right-radius: 1px;
  border-bottom-left-radius: 1px;
}
.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
  border-top-right-radius: 0;
  border-top-left-radius: 0;
}
.panel-heading + .list-group .list-group-item:first-child {
  border-top-width: 0;
}
.list-group + .panel-footer {
  border-top-width: 0;
}
.panel > .table,
.panel > .table-responsive > .table,
.panel > .panel-collapse > .table {
  margin-bottom: 0;
}
.panel > .table caption,
.panel > .table-responsive > .table caption,
.panel > .panel-collapse > .table caption {
  padding-left: 15px;
  padding-right: 15px;
}
.panel > .table:first-child,
.panel > .table-responsive:first-child > .table:first-child {
  border-top-right-radius: 1px;
  border-top-left-radius: 1px;
}
.panel > .table:first-child > thead:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
  border-top-left-radius: 1px;
  border-top-right-radius: 1px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
  border-top-left-radius: 1px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
  border-top-right-radius: 1px;
}
.panel > .table:last-child,
.panel > .table-responsive:last-child > .table:last-child {
  border-bottom-right-radius: 1px;
  border-bottom-left-radius: 1px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
  border-bottom-left-radius: 1px;
  border-bottom-right-radius: 1px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
  border-bottom-left-radius: 1px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
  border-bottom-right-radius: 1px;
}
.panel > .panel-body + .table,
.panel > .panel-body + .table-responsive,
.panel > .table + .panel-body,
.panel > .table-responsive + .panel-body {
  border-top: 1px solid #ddd;
}
.panel > .table > tbody:first-child > tr:first-child th,
.panel > .table > tbody:first-child > tr:first-child td {
  border-top: 0;
}
.panel > .table-bordered,
.panel > .table-responsive > .table-bordered {
  border: 0;
}
.panel > .table-bordered > thead > tr > th:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
.panel > .table-bordered > tbody > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
.panel > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-bordered > thead > tr > td:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
.panel > .table-bordered > tbody > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
.panel > .table-bordered > tfoot > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
  border-left: 0;
}
.panel > .table-bordered > thead > tr > th:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
.panel > .table-bordered > tbody > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
.panel > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-bordered > thead > tr > td:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
.panel > .table-bordered > tbody > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
.panel > .table-bordered > tfoot > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
  border-right: 0;
}
.panel > .table-bordered > thead > tr:first-child > td,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
.panel > .table-bordered > tbody > tr:first-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
.panel > .table-bordered > thead > tr:first-child > th,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
.panel > .table-bordered > tbody > tr:first-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
  border-bottom: 0;
}
.panel > .table-bordered > tbody > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
.panel > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-bordered > tbody > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
.panel > .table-bordered > tfoot > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
  border-bottom: 0;
}
.panel > .table-responsive {
  border: 0;
  margin-bottom: 0;
}
.panel-group {
  margin-bottom: 18px;
}
.panel-group .panel {
  margin-bottom: 0;
  border-radius: 2px;
}
.panel-group .panel + .panel {
  margin-top: 5px;
}
.panel-group .panel-heading {
  border-bottom: 0;
}
.panel-group .panel-heading + .panel-collapse > .panel-body,
.panel-group .panel-heading + .panel-collapse > .list-group {
  border-top: 1px solid #ddd;
}
.panel-group .panel-footer {
  border-top: 0;
}
.panel-group .panel-footer + .panel-collapse .panel-body {
  border-bottom: 1px solid #ddd;
}
.panel-default {
  border-color: #ddd;
}
.panel-default > .panel-heading {
  color: #333333;
  background-color: #f5f5f5;
  border-color: #ddd;
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #ddd;
}
.panel-default > .panel-heading .badge {
  color: #f5f5f5;
  background-color: #333333;
}
.panel-default > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #ddd;
}
.panel-primary {
  border-color: #337ab7;
}
.panel-primary > .panel-heading {
  color: #fff;
  background-color: #337ab7;
  border-color: #337ab7;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #337ab7;
}
.panel-primary > .panel-heading .badge {
  color: #337ab7;
  background-color: #fff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #337ab7;
}
.panel-success {
  border-color: #d6e9c6;
}
.panel-success > .panel-heading {
  color: #3c763d;
  background-color: #dff0d8;
  border-color: #d6e9c6;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #d6e9c6;
}
.panel-success > .panel-heading .badge {
  color: #dff0d8;
  background-color: #3c763d;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #d6e9c6;
}
.panel-info {
  border-color: #bce8f1;
}
.panel-info > .panel-heading {
  color: #31708f;
  background-color: #d9edf7;
  border-color: #bce8f1;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #bce8f1;
}
.panel-info > .panel-heading .badge {
  color: #d9edf7;
  background-color: #31708f;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #bce8f1;
}
.panel-warning {
  border-color: #faebcc;
}
.panel-warning > .panel-heading {
  color: #8a6d3b;
  background-color: #fcf8e3;
  border-color: #faebcc;
}
.panel-warning > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #faebcc;
}
.panel-warning > .panel-heading .badge {
  color: #fcf8e3;
  background-color: #8a6d3b;
}
.panel-warning > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #faebcc;
}
.panel-danger {
  border-color: #ebccd1;
}
.panel-danger > .panel-heading {
  color: #a94442;
  background-color: #f2dede;
  border-color: #ebccd1;
}
.panel-danger > .panel-heading + .panel-collapse > .panel-body {
  border-top-color: #ebccd1;
}
.panel-danger > .panel-heading .badge {
  color: #f2dede;
  background-color: #a94442;
}
.panel-danger > .panel-footer + .panel-collapse > .panel-body {
  border-bottom-color: #ebccd1;
}
.embed-responsive {
  position: relative;
  display: block;
  height: 0;
  padding: 0;
  overflow: hidden;
}
.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100%;
  width: 100%;
  border: 0;
}
.embed-responsive-16by9 {
  padding-bottom: 56.25%;
}
.embed-responsive-4by3 {
  padding-bottom: 75%;
}
.well {
  min-height: 20px;
  padding: 19px;
  margin-bottom: 20px;
  background-color: #f5f5f5;
  border: 1px solid #e3e3e3;
  border-radius: 2px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.well blockquote {
  border-color: #ddd;
  border-color: rgba(0, 0, 0, 0.15);
}
.well-lg {
  padding: 24px;
  border-radius: 3px;
}
.well-sm {
  padding: 9px;
  border-radius: 1px;
}
.close {
  float: right;
  font-size: 19.5px;
  font-weight: bold;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: 0.2;
  filter: alpha(opacity=20);
}
.close:hover,
.close:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
  opacity: 0.5;
  filter: alpha(opacity=50);
}
button.close {
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 0;
  -webkit-appearance: none;
}
.modal-open {
  overflow: hidden;
}
.modal {
  display: none;
  overflow: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  -webkit-overflow-scrolling: touch;
  outline: 0;
}
.modal.fade .modal-dialog {
  -webkit-transform: translate(0, -25%);
  -ms-transform: translate(0, -25%);
  -o-transform: translate(0, -25%);
  transform: translate(0, -25%);
  -webkit-transition: -webkit-transform 0.3s ease-out;
  -moz-transition: -moz-transform 0.3s ease-out;
  -o-transition: -o-transform 0.3s ease-out;
  transition: transform 0.3s ease-out;
}
.modal.in .modal-dialog {
  -webkit-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  transform: translate(0, 0);
}
.modal-open .modal {
  overflow-x: hidden;
  overflow-y: auto;
}
.modal-dialog {
  position: relative;
  width: auto;
  margin: 10px;
}
.modal-content {
  position: relative;
  background-color: #fff;
  border: 1px solid #999;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
  background-clip: padding-box;
  outline: 0;
}
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  background-color: #000;
}
.modal-backdrop.fade {
  opacity: 0;
  filter: alpha(opacity=0);
}
.modal-backdrop.in {
  opacity: 0.5;
  filter: alpha(opacity=50);
}
.modal-header {
  padding: 15px;
  border-bottom: 1px solid #e5e5e5;
}
.modal-header .close {
  margin-top: -2px;
}
.modal-title {
  margin: 0;
  line-height: 1.42857143;
}
.modal-body {
  position: relative;
  padding: 15px;
}
.modal-footer {
  padding: 15px;
  text-align: right;
  border-top: 1px solid #e5e5e5;
}
.modal-footer .btn + .btn {
  margin-left: 5px;
  margin-bottom: 0;
}
.modal-footer .btn-group .btn + .btn {
  margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
  margin-left: 0;
}
.modal-scrollbar-measure {
  position: absolute;
  top: -9999px;
  width: 50px;
  height: 50px;
  overflow: scroll;
}
@media (min-width: 768px) {
  .modal-dialog {
    width: 600px;
    margin: 30px auto;
  }
  .modal-content {
    -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
  }
  .modal-sm {
    width: 300px;
  }
}
@media (min-width: 992px) {
  .modal-lg {
    width: 900px;
  }
}
.tooltip {
  position: absolute;
  z-index: 1070;
  display: block;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-break: auto;
  line-height: 1.42857143;
  text-align: left;
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: normal;
  word-break: normal;
  word-spacing: normal;
  word-wrap: normal;
  font-size: 12px;
  opacity: 0;
  filter: alpha(opacity=0);
}
.tooltip.in {
  opacity: 0.9;
  filter: alpha(opacity=90);
}
.tooltip.top {
  margin-top: -3px;
  padding: 5px 0;
}
.tooltip.right {
  margin-left: 3px;
  padding: 0 5px;
}
.tooltip.bottom {
  margin-top: 3px;
  padding: 5px 0;
}
.tooltip.left {
  margin-left: -3px;
  padding: 0 5px;
}
.tooltip-inner {
  max-width: 200px;
  padding: 3px 8px;
  color: #fff;
  text-align: center;
  background-color: #000;
  border-radius: 2px;
}
.tooltip-arrow {
  position: absolute;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.tooltip.top .tooltip-arrow {
  bottom: 0;
  left: 50%;
  margin-left: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000;
}
.tooltip.top-left .tooltip-arrow {
  bottom: 0;
  right: 5px;
  margin-bottom: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000;
}
.tooltip.top-right .tooltip-arrow {
  bottom: 0;
  left: 5px;
  margin-bottom: -5px;
  border-width: 5px 5px 0;
  border-top-color: #000;
}
.tooltip.right .tooltip-arrow {
  top: 50%;
  left: 0;
  margin-top: -5px;
  border-width: 5px 5px 5px 0;
  border-right-color: #000;
}
.tooltip.left .tooltip-arrow {
  top: 50%;
  right: 0;
  margin-top: -5px;
  border-width: 5px 0 5px 5px;
  border-left-color: #000;
}
.tooltip.bottom .tooltip-arrow {
  top: 0;
  left: 50%;
  margin-left: -5px;
  border-width: 0 5px 5px;
  border-bottom-color: #000;
}
.tooltip.bottom-left .tooltip-arrow {
  top: 0;
  right: 5px;
  margin-top: -5px;
  border-width: 0 5px 5px;
  border-bottom-color: #000;
}
.tooltip.bottom-right .tooltip-arrow {
  top: 0;
  left: 5px;
  margin-top: -5px;
  border-width: 0 5px 5px;
  border-bottom-color: #000;
}
.popover {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1060;
  display: none;
  max-width: 276px;
  padding: 1px;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-style: normal;
  font-weight: normal;
  letter-spacing: normal;
  line-break: auto;
  line-height: 1.42857143;
  text-align: left;
  text-align: start;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  white-space: normal;
  word-break: normal;
  word-spacing: normal;
  word-wrap: normal;
  font-size: 13px;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ccc;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.popover.top {
  margin-top: -10px;
}
.popover.right {
  margin-left: 10px;
}
.popover.bottom {
  margin-top: 10px;
}
.popover.left {
  margin-left: -10px;
}
.popover-title {
  margin: 0;
  padding: 8px 14px;
  font-size: 13px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #ebebeb;
  border-radius: 2px 2px 0 0;
}
.popover-content {
  padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
  position: absolute;
  display: block;
  width: 0;
  height: 0;
  border-color: transparent;
  border-style: solid;
}
.popover > .arrow {
  border-width: 11px;
}
.popover > .arrow:after {
  border-width: 10px;
  content: "";
}
.popover.top > .arrow {
  left: 50%;
  margin-left: -11px;
  border-bottom-width: 0;
  border-top-color: #999999;
  border-top-color: rgba(0, 0, 0, 0.25);
  bottom: -11px;
}
.popover.top > .arrow:after {
  content: " ";
  bottom: 1px;
  margin-left: -10px;
  border-bottom-width: 0;
  border-top-color: #fff;
}
.popover.right > .arrow {
  top: 50%;
  left: -11px;
  margin-top: -11px;
  border-left-width: 0;
  border-right-color: #999999;
  border-right-color: rgba(0, 0, 0, 0.25);
}
.popover.right > .arrow:after {
  content: " ";
  left: 1px;
  bottom: -10px;
  border-left-width: 0;
  border-right-color: #fff;
}
.popover.bottom > .arrow {
  left: 50%;
  margin-left: -11px;
  border-top-width: 0;
  border-bottom-color: #999999;
  border-bottom-color: rgba(0, 0, 0, 0.25);
  top: -11px;
}
.popover.bottom > .arrow:after {
  content: " ";
  top: 1px;
  margin-left: -10px;
  border-top-width: 0;
  border-bottom-color: #fff;
}
.popover.left > .arrow {
  top: 50%;
  right: -11px;
  margin-top: -11px;
  border-right-width: 0;
  border-left-color: #999999;
  border-left-color: rgba(0, 0, 0, 0.25);
}
.popover.left > .arrow:after {
  content: " ";
  right: 1px;
  border-right-width: 0;
  border-left-color: #fff;
  bottom: -10px;
}
.carousel {
  position: relative;
}
.carousel-inner {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.carousel-inner > .item {
  display: none;
  position: relative;
  -webkit-transition: 0.6s ease-in-out left;
  -o-transition: 0.6s ease-in-out left;
  transition: 0.6s ease-in-out left;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
  line-height: 1;
}
@media all and (transform-3d), (-webkit-transform-3d) {
  .carousel-inner > .item {
    -webkit-transition: -webkit-transform 0.6s ease-in-out;
    -moz-transition: -moz-transform 0.6s ease-in-out;
    -o-transition: -o-transform 0.6s ease-in-out;
    transition: transform 0.6s ease-in-out;
    -webkit-backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    -moz-perspective: 1000px;
    perspective: 1000px;
  }
  .carousel-inner > .item.next,
  .carousel-inner > .item.active.right {
    -webkit-transform: translate3d(100%, 0, 0);
    transform: translate3d(100%, 0, 0);
    left: 0;
  }
  .carousel-inner > .item.prev,
  .carousel-inner > .item.active.left {
    -webkit-transform: translate3d(-100%, 0, 0);
    transform: translate3d(-100%, 0, 0);
    left: 0;
  }
  .carousel-inner > .item.next.left,
  .carousel-inner > .item.prev.right,
  .carousel-inner > .item.active {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    left: 0;
  }
}
.carousel-inner > .active,
.carousel-inner > .next,
.carousel-inner > .prev {
  display: block;
}
.carousel-inner > .active {
  left: 0;
}
.carousel-inner > .next,
.carousel-inner > .prev {
  position: absolute;
  top: 0;
  width: 100%;
}
.carousel-inner > .next {
  left: 100%;
}
.carousel-inner > .prev {
  left: -100%;
}
.carousel-inner > .next.left,
.carousel-inner > .prev.right {
  left: 0;
}
.carousel-inner > .active.left {
  left: -100%;
}
.carousel-inner > .active.right {
  left: 100%;
}
.carousel-control {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 15%;
  opacity: 0.5;
  filter: alpha(opacity=50);
  font-size: 20px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  background-color: rgba(0, 0, 0, 0);
}
.carousel-control.left {
  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
}
.carousel-control.right {
  left: auto;
  right: 0;
  background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
  background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
  background-repeat: repeat-x;
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
}
.carousel-control:hover,
.carousel-control:focus {
  outline: 0;
  color: #fff;
  text-decoration: none;
  opacity: 0.9;
  filter: alpha(opacity=90);
}
.carousel-control .icon-prev,
.carousel-control .icon-next,
.carousel-control .glyphicon-chevron-left,
.carousel-control .glyphicon-chevron-right {
  position: absolute;
  top: 50%;
  margin-top: -10px;
  z-index: 5;
  display: inline-block;
}
.carousel-control .icon-prev,
.carousel-control .glyphicon-chevron-left {
  left: 50%;
  margin-left: -10px;
}
.carousel-control .icon-next,
.carousel-control .glyphicon-chevron-right {
  right: 50%;
  margin-right: -10px;
}
.carousel-control .icon-prev,
.carousel-control .icon-next {
  width: 20px;
  height: 20px;
  line-height: 1;
  font-family: serif;
}
.carousel-control .icon-prev:before {
  content: '\2039';
}
.carousel-control .icon-next:before {
  content: '\203a';
}
.carousel-indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 15;
  width: 60%;
  margin-left: -30%;
  padding-left: 0;
  list-style: none;
  text-align: center;
}
.carousel-indicators li {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 1px;
  text-indent: -999px;
  border: 1px solid #fff;
  border-radius: 10px;
  cursor: pointer;
  background-color: #000 \9;
  background-color: rgba(0, 0, 0, 0);
}
.carousel-indicators .active {
  margin: 0;
  width: 12px;
  height: 12px;
  background-color: #fff;
}
.carousel-caption {
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 20px;
  z-index: 10;
  padding-top: 20px;
  padding-bottom: 20px;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.carousel-caption .btn {
  text-shadow: none;
}
@media screen and (min-width: 768px) {
  .carousel-control .glyphicon-chevron-left,
  .carousel-control .glyphicon-chevron-right,
  .carousel-control .icon-prev,
  .carousel-control .icon-next {
    width: 30px;
    height: 30px;
    margin-top: -10px;
    font-size: 30px;
  }
  .carousel-control .glyphicon-chevron-left,
  .carousel-control .icon-prev {
    margin-left: -10px;
  }
  .carousel-control .glyphicon-chevron-right,
  .carousel-control .icon-next {
    margin-right: -10px;
  }
  .carousel-caption {
    left: 20%;
    right: 20%;
    padding-bottom: 30px;
  }
  .carousel-indicators {
    bottom: 20px;
  }
}
.clearfix:before,
.clearfix:after,
.dl-horizontal dd:before,
.dl-horizontal dd:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after,
.form-horizontal .form-group:before,
.form-horizontal .form-group:after,
.btn-toolbar:before,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:before,
.btn-group-vertical > .btn-group:after,
.nav:before,
.nav:after,
.navbar:before,
.navbar:after,
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after,
.pager:before,
.pager:after,
.panel-body:before,
.panel-body:after,
.modal-header:before,
.modal-header:after,
.modal-footer:before,
.modal-footer:after,
.item_buttons:before,
.item_buttons:after {
  content: " ";
  display: table;
}
.clearfix:after,
.dl-horizontal dd:after,
.container:after,
.container-fluid:after,
.row:after,
.form-horizontal .form-group:after,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:after,
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after,
.pager:after,
.panel-body:after,
.modal-header:after,
.modal-footer:after,
.item_buttons:after {
  clear: both;
}
.center-block {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.pull-right {
  float: right !important;
}
.pull-left {
  float: left !important;
}
.hide {
  display: none !important;
}
.show {
  display: block !important;
}
.invisible {
  visibility: hidden;
}
.text-hide {
  font: 0/0 a;
  color: transparent;
  text-shadow: none;
  background-color: transparent;
  border: 0;
}
.hidden {
  display: none !important;
}
.affix {
  position: fixed;
}
@-ms-viewport {
  width: device-width;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
  display: none !important;
}
.visible-xs-block,
.visible-xs-inline,
.visible-xs-inline-block,
.visible-sm-block,
.visible-sm-inline,
.visible-sm-inline-block,
.visible-md-block,
.visible-md-inline,
.visible-md-inline-block,
.visible-lg-block,
.visible-lg-inline,
.visible-lg-inline-block {
  display: none !important;
}
@media (max-width: 767px) {
  .visible-xs {
    display: block !important;
  }
  table.visible-xs {
    display: table !important;
  }
  tr.visible-xs {
    display: table-row !important;
  }
  th.visible-xs,
  td.visible-xs {
    display: table-cell !important;
  }
}
@media (max-width: 767px) {
  .visible-xs-block {
    display: block !important;
  }
}
@media (max-width: 767px) {
  .visible-xs-inline {
    display: inline !important;
  }
}
@media (max-width: 767px) {
  .visible-xs-inline-block {
    display: inline-block !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .visible-sm {
    display: block !important;
  }
  table.visible-sm {
    display: table !important;
  }
  tr.visible-sm {
    display: table-row !important;
  }
  th.visible-sm,
  td.visible-sm {
    display: table-cell !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .visible-sm-block {
    display: block !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .visible-sm-inline {
    display: inline !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .visible-sm-inline-block {
    display: inline-block !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .visible-md {
    display: block !important;
  }
  table.visible-md {
    display: table !important;
  }
  tr.visible-md {
    display: table-row !important;
  }
  th.visible-md,
  td.visible-md {
    display: table-cell !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .visible-md-block {
    display: block !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .visible-md-inline {
    display: inline !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .visible-md-inline-block {
    display: inline-block !important;
  }
}
@media (min-width: 1200px) {
  .visible-lg {
    display: block !important;
  }
  table.visible-lg {
    display: table !important;
  }
  tr.visible-lg {
    display: table-row !important;
  }
  th.visible-lg,
  td.visible-lg {
    display: table-cell !important;
  }
}
@media (min-width: 1200px) {
  .visible-lg-block {
    display: block !important;
  }
}
@media (min-width: 1200px) {
  .visible-lg-inline {
    display: inline !important;
  }
}
@media (min-width: 1200px) {
  .visible-lg-inline-block {
    display: inline-block !important;
  }
}
@media (max-width: 767px) {
  .hidden-xs {
    display: none !important;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  .hidden-sm {
    display: none !important;
  }
}
@media (min-width: 992px) and (max-width: 1199px) {
  .hidden-md {
    display: none !important;
  }
}
@media (min-width: 1200px) {
  .hidden-lg {
    display: none !important;
  }
}
.visible-print {
  display: none !important;
}
@media print {
  .visible-print {
    display: block !important;
  }
  table.visible-print {
    display: table !important;
  }
  tr.visible-print {
    display: table-row !important;
  }
  th.visible-print,
  td.visible-print {
    display: table-cell !important;
  }
}
.visible-print-block {
  display: none !important;
}
@media print {
  .visible-print-block {
    display: block !important;
  }
}
.visible-print-inline {
  display: none !important;
}
@media print {
  .visible-print-inline {
    display: inline !important;
  }
}
.visible-print-inline-block {
  display: none !important;
}
@media print {
  .visible-print-inline-block {
    display: inline-block !important;
  }
}
@media print {
  .hidden-print {
    display: none !important;
  }
}
/*!
*
* Font Awesome
*
*/
/*!
 *  Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
 *  License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
 */
/* FONT PATH
 * -------------------------- */
@font-face {
  font-family: 'FontAwesome';
  src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?v=4.2.0');
  src: url('../components/font-awesome/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../components/font-awesome/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../components/font-awesome/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../components/font-awesome/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
  font-weight: normal;
  font-style: normal;
}
.fa {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* makes the font 33% larger relative to the icon container */
.fa-lg {
  font-size: 1.33333333em;
  line-height: 0.75em;
  vertical-align: -15%;
}
.fa-2x {
  font-size: 2em;
}
.fa-3x {
  font-size: 3em;
}
.fa-4x {
  font-size: 4em;
}
.fa-5x {
  font-size: 5em;
}
.fa-fw {
  width: 1.28571429em;
  text-align: center;
}
.fa-ul {
  padding-left: 0;
  margin-left: 2.14285714em;
  list-style-type: none;
}
.fa-ul > li {
  position: relative;
}
.fa-li {
  position: absolute;
  left: -2.14285714em;
  width: 2.14285714em;
  top: 0.14285714em;
  text-align: center;
}
.fa-li.fa-lg {
  left: -1.85714286em;
}
.fa-border {
  padding: .2em .25em .15em;
  border: solid 0.08em #eee;
  border-radius: .1em;
}
.pull-right {
  float: right;
}
.pull-left {
  float: left;
}
.fa.pull-left {
  margin-right: .3em;
}
.fa.pull-right {
  margin-left: .3em;
}
.fa-spin {
  -webkit-animation: fa-spin 2s infinite linear;
  animation: fa-spin 2s infinite linear;
}
@-webkit-keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
@keyframes fa-spin {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(359deg);
    transform: rotate(359deg);
  }
}
.fa-rotate-90 {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
  -webkit-transform: rotate(90deg);
  -ms-transform: rotate(90deg);
  transform: rotate(90deg);
}
.fa-rotate-180 {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
  -webkit-transform: rotate(180deg);
  -ms-transform: rotate(180deg);
  transform: rotate(180deg);
}
.fa-rotate-270 {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
  -webkit-transform: rotate(270deg);
  -ms-transform: rotate(270deg);
  transform: rotate(270deg);
}
.fa-flip-horizontal {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
  -webkit-transform: scale(-1, 1);
  -ms-transform: scale(-1, 1);
  transform: scale(-1, 1);
}
.fa-flip-vertical {
  filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
  -webkit-transform: scale(1, -1);
  -ms-transform: scale(1, -1);
  transform: scale(1, -1);
}
:root .fa-rotate-90,
:root .fa-rotate-180,
:root .fa-rotate-270,
:root .fa-flip-horizontal,
:root .fa-flip-vertical {
  filter: none;
}
.fa-stack {
  position: relative;
  display: inline-block;
  width: 2em;
  height: 2em;
  line-height: 2em;
  vertical-align: middle;
}
.fa-stack-1x,
.fa-stack-2x {
  position: absolute;
  left: 0;
  width: 100%;
  text-align: center;
}
.fa-stack-1x {
  line-height: inherit;
}
.fa-stack-2x {
  font-size: 2em;
}
.fa-inverse {
  color: #fff;
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
   readers do not read off random characters that represent icons */
.fa-glass:before {
  content: "\f000";
}
.fa-music:before {
  content: "\f001";
}
.fa-search:before {
  content: "\f002";
}
.fa-envelope-o:before {
  content: "\f003";
}
.fa-heart:before {
  content: "\f004";
}
.fa-star:before {
  content: "\f005";
}
.fa-star-o:before {
  content: "\f006";
}
.fa-user:before {
  content: "\f007";
}
.fa-film:before {
  content: "\f008";
}
.fa-th-large:before {
  content: "\f009";
}
.fa-th:before {
  content: "\f00a";
}
.fa-th-list:before {
  content: "\f00b";
}
.fa-check:before {
  content: "\f00c";
}
.fa-remove:before,
.fa-close:before,
.fa-times:before {
  content: "\f00d";
}
.fa-search-plus:before {
  content: "\f00e";
}
.fa-search-minus:before {
  content: "\f010";
}
.fa-power-off:before {
  content: "\f011";
}
.fa-signal:before {
  content: "\f012";
}
.fa-gear:before,
.fa-cog:before {
  content: "\f013";
}
.fa-trash-o:before {
  content: "\f014";
}
.fa-home:before {
  content: "\f015";
}
.fa-file-o:before {
  content: "\f016";
}
.fa-clock-o:before {
  content: "\f017";
}
.fa-road:before {
  content: "\f018";
}
.fa-download:before {
  content: "\f019";
}
.fa-arrow-circle-o-down:before {
  content: "\f01a";
}
.fa-arrow-circle-o-up:before {
  content: "\f01b";
}
.fa-inbox:before {
  content: "\f01c";
}
.fa-play-circle-o:before {
  content: "\f01d";
}
.fa-rotate-right:before,
.fa-repeat:before {
  content: "\f01e";
}
.fa-refresh:before {
  content: "\f021";
}
.fa-list-alt:before {
  content: "\f022";
}
.fa-lock:before {
  content: "\f023";
}
.fa-flag:before {
  content: "\f024";
}
.fa-headphones:before {
  content: "\f025";
}
.fa-volume-off:before {
  content: "\f026";
}
.fa-volume-down:before {
  content: "\f027";
}
.fa-volume-up:before {
  content: "\f028";
}
.fa-qrcode:before {
  content: "\f029";
}
.fa-barcode:before {
  content: "\f02a";
}
.fa-tag:before {
  content: "\f02b";
}
.fa-tags:before {
  content: "\f02c";
}
.fa-book:before {
  content: "\f02d";
}
.fa-bookmark:before {
  content: "\f02e";
}
.fa-print:before {
  content: "\f02f";
}
.fa-camera:before {
  content: "\f030";
}
.fa-font:before {
  content: "\f031";
}
.fa-bold:before {
  content: "\f032";
}
.fa-italic:before {
  content: "\f033";
}
.fa-text-height:before {
  content: "\f034";
}
.fa-text-width:before {
  content: "\f035";
}
.fa-align-left:before {
  content: "\f036";
}
.fa-align-center:before {
  content: "\f037";
}
.fa-align-right:before {
  content: "\f038";
}
.fa-align-justify:before {
  content: "\f039";
}
.fa-list:before {
  content: "\f03a";
}
.fa-dedent:before,
.fa-outdent:before {
  content: "\f03b";
}
.fa-indent:before {
  content: "\f03c";
}
.fa-video-camera:before {
  content: "\f03d";
}
.fa-photo:before,
.fa-image:before,
.fa-picture-o:before {
  content: "\f03e";
}
.fa-pencil:before {
  content: "\f040";
}
.fa-map-marker:before {
  content: "\f041";
}
.fa-adjust:before {
  content: "\f042";
}
.fa-tint:before {
  content: "\f043";
}
.fa-edit:before,
.fa-pencil-square-o:before {
  content: "\f044";
}
.fa-share-square-o:before {
  content: "\f045";
}
.fa-check-square-o:before {
  content: "\f046";
}
.fa-arrows:before {
  content: "\f047";
}
.fa-step-backward:before {
  content: "\f048";
}
.fa-fast-backward:before {
  content: "\f049";
}
.fa-backward:before {
  content: "\f04a";
}
.fa-play:before {
  content: "\f04b";
}
.fa-pause:before {
  content: "\f04c";
}
.fa-stop:before {
  content: "\f04d";
}
.fa-forward:before {
  content: "\f04e";
}
.fa-fast-forward:before {
  content: "\f050";
}
.fa-step-forward:before {
  content: "\f051";
}
.fa-eject:before {
  content: "\f052";
}
.fa-chevron-left:before {
  content: "\f053";
}
.fa-chevron-right:before {
  content: "\f054";
}
.fa-plus-circle:before {
  content: "\f055";
}
.fa-minus-circle:before {
  content: "\f056";
}
.fa-times-circle:before {
  content: "\f057";
}
.fa-check-circle:before {
  content: "\f058";
}
.fa-question-circle:before {
  content: "\f059";
}
.fa-info-circle:before {
  content: "\f05a";
}
.fa-crosshairs:before {
  content: "\f05b";
}
.fa-times-circle-o:before {
  content: "\f05c";
}
.fa-check-circle-o:before {
  content: "\f05d";
}
.fa-ban:before {
  content: "\f05e";
}
.fa-arrow-left:before {
  content: "\f060";
}
.fa-arrow-right:before {
  content: "\f061";
}
.fa-arrow-up:before {
  content: "\f062";
}
.fa-arrow-down:before {
  content: "\f063";
}
.fa-mail-forward:before,
.fa-share:before {
  content: "\f064";
}
.fa-expand:before {
  content: "\f065";
}
.fa-compress:before {
  content: "\f066";
}
.fa-plus:before {
  content: "\f067";
}
.fa-minus:before {
  content: "\f068";
}
.fa-asterisk:before {
  content: "\f069";
}
.fa-exclamation-circle:before {
  content: "\f06a";
}
.fa-gift:before {
  content: "\f06b";
}
.fa-leaf:before {
  content: "\f06c";
}
.fa-fire:before {
  content: "\f06d";
}
.fa-eye:before {
  content: "\f06e";
}
.fa-eye-slash:before {
  content: "\f070";
}
.fa-warning:before,
.fa-exclamation-triangle:before {
  content: "\f071";
}
.fa-plane:before {
  content: "\f072";
}
.fa-calendar:before {
  content: "\f073";
}
.fa-random:before {
  content: "\f074";
}
.fa-comment:before {
  content: "\f075";
}
.fa-magnet:before {
  content: "\f076";
}
.fa-chevron-up:before {
  content: "\f077";
}
.fa-chevron-down:before {
  content: "\f078";
}
.fa-retweet:before {
  content: "\f079";
}
.fa-shopping-cart:before {
  content: "\f07a";
}
.fa-folder:before {
  content: "\f07b";
}
.fa-folder-open:before {
  content: "\f07c";
}
.fa-arrows-v:before {
  content: "\f07d";
}
.fa-arrows-h:before {
  content: "\f07e";
}
.fa-bar-chart-o:before,
.fa-bar-chart:before {
  content: "\f080";
}
.fa-twitter-square:before {
  content: "\f081";
}
.fa-facebook-square:before {
  content: "\f082";
}
.fa-camera-retro:before {
  content: "\f083";
}
.fa-key:before {
  content: "\f084";
}
.fa-gears:before,
.fa-cogs:before {
  content: "\f085";
}
.fa-comments:before {
  content: "\f086";
}
.fa-thumbs-o-up:before {
  content: "\f087";
}
.fa-thumbs-o-down:before {
  content: "\f088";
}
.fa-star-half:before {
  content: "\f089";
}
.fa-heart-o:before {
  content: "\f08a";
}
.fa-sign-out:before {
  content: "\f08b";
}
.fa-linkedin-square:before {
  content: "\f08c";
}
.fa-thumb-tack:before {
  content: "\f08d";
}
.fa-external-link:before {
  content: "\f08e";
}
.fa-sign-in:before {
  content: "\f090";
}
.fa-trophy:before {
  content: "\f091";
}
.fa-github-square:before {
  content: "\f092";
}
.fa-upload:before {
  content: "\f093";
}
.fa-lemon-o:before {
  content: "\f094";
}
.fa-phone:before {
  content: "\f095";
}
.fa-square-o:before {
  content: "\f096";
}
.fa-bookmark-o:before {
  content: "\f097";
}
.fa-phone-square:before {
  content: "\f098";
}
.fa-twitter:before {
  content: "\f099";
}
.fa-facebook:before {
  content: "\f09a";
}
.fa-github:before {
  content: "\f09b";
}
.fa-unlock:before {
  content: "\f09c";
}
.fa-credit-card:before {
  content: "\f09d";
}
.fa-rss:before {
  content: "\f09e";
}
.fa-hdd-o:before {
  content: "\f0a0";
}
.fa-bullhorn:before {
  content: "\f0a1";
}
.fa-bell:before {
  content: "\f0f3";
}
.fa-certificate:before {
  content: "\f0a3";
}
.fa-hand-o-right:before {
  content: "\f0a4";
}
.fa-hand-o-left:before {
  content: "\f0a5";
}
.fa-hand-o-up:before {
  content: "\f0a6";
}
.fa-hand-o-down:before {
  content: "\f0a7";
}
.fa-arrow-circle-left:before {
  content: "\f0a8";
}
.fa-arrow-circle-right:before {
  content: "\f0a9";
}
.fa-arrow-circle-up:before {
  content: "\f0aa";
}
.fa-arrow-circle-down:before {
  content: "\f0ab";
}
.fa-globe:before {
  content: "\f0ac";
}
.fa-wrench:before {
  content: "\f0ad";
}
.fa-tasks:before {
  content: "\f0ae";
}
.fa-filter:before {
  content: "\f0b0";
}
.fa-briefcase:before {
  content: "\f0b1";
}
.fa-arrows-alt:before {
  content: "\f0b2";
}
.fa-group:before,
.fa-users:before {
  content: "\f0c0";
}
.fa-chain:before,
.fa-link:before {
  content: "\f0c1";
}
.fa-cloud:before {
  content: "\f0c2";
}
.fa-flask:before {
  content: "\f0c3";
}
.fa-cut:before,
.fa-scissors:before {
  content: "\f0c4";
}
.fa-copy:before,
.fa-files-o:before {
  content: "\f0c5";
}
.fa-paperclip:before {
  content: "\f0c6";
}
.fa-save:before,
.fa-floppy-o:before {
  content: "\f0c7";
}
.fa-square:before {
  content: "\f0c8";
}
.fa-navicon:before,
.fa-reorder:before,
.fa-bars:before {
  content: "\f0c9";
}
.fa-list-ul:before {
  content: "\f0ca";
}
.fa-list-ol:before {
  content: "\f0cb";
}
.fa-strikethrough:before {
  content: "\f0cc";
}
.fa-underline:before {
  content: "\f0cd";
}
.fa-table:before {
  content: "\f0ce";
}
.fa-magic:before {
  content: "\f0d0";
}
.fa-truck:before {
  content: "\f0d1";
}
.fa-pinterest:before {
  content: "\f0d2";
}
.fa-pinterest-square:before {
  content: "\f0d3";
}
.fa-google-plus-square:before {
  content: "\f0d4";
}
.fa-google-plus:before {
  content: "\f0d5";
}
.fa-money:before {
  content: "\f0d6";
}
.fa-caret-down:before {
  content: "\f0d7";
}
.fa-caret-up:before {
  content: "\f0d8";
}
.fa-caret-left:before {
  content: "\f0d9";
}
.fa-caret-right:before {
  content: "\f0da";
}
.fa-columns:before {
  content: "\f0db";
}
.fa-unsorted:before,
.fa-sort:before {
  content: "\f0dc";
}
.fa-sort-down:before,
.fa-sort-desc:before {
  content: "\f0dd";
}
.fa-sort-up:before,
.fa-sort-asc:before {
  content: "\f0de";
}
.fa-envelope:before {
  content: "\f0e0";
}
.fa-linkedin:before {
  content: "\f0e1";
}
.fa-rotate-left:before,
.fa-undo:before {
  content: "\f0e2";
}
.fa-legal:before,
.fa-gavel:before {
  content: "\f0e3";
}
.fa-dashboard:before,
.fa-tachometer:before {
  content: "\f0e4";
}
.fa-comment-o:before {
  content: "\f0e5";
}
.fa-comments-o:before {
  content: "\f0e6";
}
.fa-flash:before,
.fa-bolt:before {
  content: "\f0e7";
}
.fa-sitemap:before {
  content: "\f0e8";
}
.fa-umbrella:before {
  content: "\f0e9";
}
.fa-paste:before,
.fa-clipboard:before {
  content: "\f0ea";
}
.fa-lightbulb-o:before {
  content: "\f0eb";
}
.fa-exchange:before {
  content: "\f0ec";
}
.fa-cloud-download:before {
  content: "\f0ed";
}
.fa-cloud-upload:before {
  content: "\f0ee";
}
.fa-user-md:before {
  content: "\f0f0";
}
.fa-stethoscope:before {
  content: "\f0f1";
}
.fa-suitcase:before {
  content: "\f0f2";
}
.fa-bell-o:before {
  content: "\f0a2";
}
.fa-coffee:before {
  content: "\f0f4";
}
.fa-cutlery:before {
  content: "\f0f5";
}
.fa-file-text-o:before {
  content: "\f0f6";
}
.fa-building-o:before {
  content: "\f0f7";
}
.fa-hospital-o:before {
  content: "\f0f8";
}
.fa-ambulance:before {
  content: "\f0f9";
}
.fa-medkit:before {
  content: "\f0fa";
}
.fa-fighter-jet:before {
  content: "\f0fb";
}
.fa-beer:before {
  content: "\f0fc";
}
.fa-h-square:before {
  content: "\f0fd";
}
.fa-plus-square:before {
  content: "\f0fe";
}
.fa-angle-double-left:before {
  content: "\f100";
}
.fa-angle-double-right:before {
  content: "\f101";
}
.fa-angle-double-up:before {
  content: "\f102";
}
.fa-angle-double-down:before {
  content: "\f103";
}
.fa-angle-left:before {
  content: "\f104";
}
.fa-angle-right:before {
  content: "\f105";
}
.fa-angle-up:before {
  content: "\f106";
}
.fa-angle-down:before {
  content: "\f107";
}
.fa-desktop:before {
  content: "\f108";
}
.fa-laptop:before {
  content: "\f109";
}
.fa-tablet:before {
  content: "\f10a";
}
.fa-mobile-phone:before,
.fa-mobile:before {
  content: "\f10b";
}
.fa-circle-o:before {
  content: "\f10c";
}
.fa-quote-left:before {
  content: "\f10d";
}
.fa-quote-right:before {
  content: "\f10e";
}
.fa-spinner:before {
  content: "\f110";
}
.fa-circle:before {
  content: "\f111";
}
.fa-mail-reply:before,
.fa-reply:before {
  content: "\f112";
}
.fa-github-alt:before {
  content: "\f113";
}
.fa-folder-o:before {
  content: "\f114";
}
.fa-folder-open-o:before {
  content: "\f115";
}
.fa-smile-o:before {
  content: "\f118";
}
.fa-frown-o:before {
  content: "\f119";
}
.fa-meh-o:before {
  content: "\f11a";
}
.fa-gamepad:before {
  content: "\f11b";
}
.fa-keyboard-o:before {
  content: "\f11c";
}
.fa-flag-o:before {
  content: "\f11d";
}
.fa-flag-checkered:before {
  content: "\f11e";
}
.fa-terminal:before {
  content: "\f120";
}
.fa-code:before {
  content: "\f121";
}
.fa-mail-reply-all:before,
.fa-reply-all:before {
  content: "\f122";
}
.fa-star-half-empty:before,
.fa-star-half-full:before,
.fa-star-half-o:before {
  content: "\f123";
}
.fa-location-arrow:before {
  content: "\f124";
}
.fa-crop:before {
  content: "\f125";
}
.fa-code-fork:before {
  content: "\f126";
}
.fa-unlink:before,
.fa-chain-broken:before {
  content: "\f127";
}
.fa-question:before {
  content: "\f128";
}
.fa-info:before {
  content: "\f129";
}
.fa-exclamation:before {
  content: "\f12a";
}
.fa-superscript:before {
  content: "\f12b";
}
.fa-subscript:before {
  content: "\f12c";
}
.fa-eraser:before {
  content: "\f12d";
}
.fa-puzzle-piece:before {
  content: "\f12e";
}
.fa-microphone:before {
  content: "\f130";
}
.fa-microphone-slash:before {
  content: "\f131";
}
.fa-shield:before {
  content: "\f132";
}
.fa-calendar-o:before {
  content: "\f133";
}
.fa-fire-extinguisher:before {
  content: "\f134";
}
.fa-rocket:before {
  content: "\f135";
}
.fa-maxcdn:before {
  content: "\f136";
}
.fa-chevron-circle-left:before {
  content: "\f137";
}
.fa-chevron-circle-right:before {
  content: "\f138";
}
.fa-chevron-circle-up:before {
  content: "\f139";
}
.fa-chevron-circle-down:before {
  content: "\f13a";
}
.fa-html5:before {
  content: "\f13b";
}
.fa-css3:before {
  content: "\f13c";
}
.fa-anchor:before {
  content: "\f13d";
}
.fa-unlock-alt:before {
  content: "\f13e";
}
.fa-bullseye:before {
  content: "\f140";
}
.fa-ellipsis-h:before {
  content: "\f141";
}
.fa-ellipsis-v:before {
  content: "\f142";
}
.fa-rss-square:before {
  content: "\f143";
}
.fa-play-circle:before {
  content: "\f144";
}
.fa-ticket:before {
  content: "\f145";
}
.fa-minus-square:before {
  content: "\f146";
}
.fa-minus-square-o:before {
  content: "\f147";
}
.fa-level-up:before {
  content: "\f148";
}
.fa-level-down:before {
  content: "\f149";
}
.fa-check-square:before {
  content: "\f14a";
}
.fa-pencil-square:before {
  content: "\f14b";
}
.fa-external-link-square:before {
  content: "\f14c";
}
.fa-share-square:before {
  content: "\f14d";
}
.fa-compass:before {
  content: "\f14e";
}
.fa-toggle-down:before,
.fa-caret-square-o-down:before {
  content: "\f150";
}
.fa-toggle-up:before,
.fa-caret-square-o-up:before {
  content: "\f151";
}
.fa-toggle-right:before,
.fa-caret-square-o-right:before {
  content: "\f152";
}
.fa-euro:before,
.fa-eur:before {
  content: "\f153";
}
.fa-gbp:before {
  content: "\f154";
}
.fa-dollar:before,
.fa-usd:before {
  content: "\f155";
}
.fa-rupee:before,
.fa-inr:before {
  content: "\f156";
}
.fa-cny:before,
.fa-rmb:before,
.fa-yen:before,
.fa-jpy:before {
  content: "\f157";
}
.fa-ruble:before,
.fa-rouble:before,
.fa-rub:before {
  content: "\f158";
}
.fa-won:before,
.fa-krw:before {
  content: "\f159";
}
.fa-bitcoin:before,
.fa-btc:before {
  content: "\f15a";
}
.fa-file:before {
  content: "\f15b";
}
.fa-file-text:before {
  content: "\f15c";
}
.fa-sort-alpha-asc:before {
  content: "\f15d";
}
.fa-sort-alpha-desc:before {
  content: "\f15e";
}
.fa-sort-amount-asc:before {
  content: "\f160";
}
.fa-sort-amount-desc:before {
  content: "\f161";
}
.fa-sort-numeric-asc:before {
  content: "\f162";
}
.fa-sort-numeric-desc:before {
  content: "\f163";
}
.fa-thumbs-up:before {
  content: "\f164";
}
.fa-thumbs-down:before {
  content: "\f165";
}
.fa-youtube-square:before {
  content: "\f166";
}
.fa-youtube:before {
  content: "\f167";
}
.fa-xing:before {
  content: "\f168";
}
.fa-xing-square:before {
  content: "\f169";
}
.fa-youtube-play:before {
  content: "\f16a";
}
.fa-dropbox:before {
  content: "\f16b";
}
.fa-stack-overflow:before {
  content: "\f16c";
}
.fa-instagram:before {
  content: "\f16d";
}
.fa-flickr:before {
  content: "\f16e";
}
.fa-adn:before {
  content: "\f170";
}
.fa-bitbucket:before {
  content: "\f171";
}
.fa-bitbucket-square:before {
  content: "\f172";
}
.fa-tumblr:before {
  content: "\f173";
}
.fa-tumblr-square:before {
  content: "\f174";
}
.fa-long-arrow-down:before {
  content: "\f175";
}
.fa-long-arrow-up:before {
  content: "\f176";
}
.fa-long-arrow-left:before {
  content: "\f177";
}
.fa-long-arrow-right:before {
  content: "\f178";
}
.fa-apple:before {
  content: "\f179";
}
.fa-windows:before {
  content: "\f17a";
}
.fa-android:before {
  content: "\f17b";
}
.fa-linux:before {
  content: "\f17c";
}
.fa-dribbble:before {
  content: "\f17d";
}
.fa-skype:before {
  content: "\f17e";
}
.fa-foursquare:before {
  content: "\f180";
}
.fa-trello:before {
  content: "\f181";
}
.fa-female:before {
  content: "\f182";
}
.fa-male:before {
  content: "\f183";
}
.fa-gittip:before {
  content: "\f184";
}
.fa-sun-o:before {
  content: "\f185";
}
.fa-moon-o:before {
  content: "\f186";
}
.fa-archive:before {
  content: "\f187";
}
.fa-bug:before {
  content: "\f188";
}
.fa-vk:before {
  content: "\f189";
}
.fa-weibo:before {
  content: "\f18a";
}
.fa-renren:before {
  content: "\f18b";
}
.fa-pagelines:before {
  content: "\f18c";
}
.fa-stack-exchange:before {
  content: "\f18d";
}
.fa-arrow-circle-o-right:before {
  content: "\f18e";
}
.fa-arrow-circle-o-left:before {
  content: "\f190";
}
.fa-toggle-left:before,
.fa-caret-square-o-left:before {
  content: "\f191";
}
.fa-dot-circle-o:before {
  content: "\f192";
}
.fa-wheelchair:before {
  content: "\f193";
}
.fa-vimeo-square:before {
  content: "\f194";
}
.fa-turkish-lira:before,
.fa-try:before {
  content: "\f195";
}
.fa-plus-square-o:before {
  content: "\f196";
}
.fa-space-shuttle:before {
  content: "\f197";
}
.fa-slack:before {
  content: "\f198";
}
.fa-envelope-square:before {
  content: "\f199";
}
.fa-wordpress:before {
  content: "\f19a";
}
.fa-openid:before {
  content: "\f19b";
}
.fa-institution:before,
.fa-bank:before,
.fa-university:before {
  content: "\f19c";
}
.fa-mortar-board:before,
.fa-graduation-cap:before {
  content: "\f19d";
}
.fa-yahoo:before {
  content: "\f19e";
}
.fa-google:before {
  content: "\f1a0";
}
.fa-reddit:before {
  content: "\f1a1";
}
.fa-reddit-square:before {
  content: "\f1a2";
}
.fa-stumbleupon-circle:before {
  content: "\f1a3";
}
.fa-stumbleupon:before {
  content: "\f1a4";
}
.fa-delicious:before {
  content: "\f1a5";
}
.fa-digg:before {
  content: "\f1a6";
}
.fa-pied-piper:before {
  content: "\f1a7";
}
.fa-pied-piper-alt:before {
  content: "\f1a8";
}
.fa-drupal:before {
  content: "\f1a9";
}
.fa-joomla:before {
  content: "\f1aa";
}
.fa-language:before {
  content: "\f1ab";
}
.fa-fax:before {
  content: "\f1ac";
}
.fa-building:before {
  content: "\f1ad";
}
.fa-child:before {
  content: "\f1ae";
}
.fa-paw:before {
  content: "\f1b0";
}
.fa-spoon:before {
  content: "\f1b1";
}
.fa-cube:before {
  content: "\f1b2";
}
.fa-cubes:before {
  content: "\f1b3";
}
.fa-behance:before {
  content: "\f1b4";
}
.fa-behance-square:before {
  content: "\f1b5";
}
.fa-steam:before {
  content: "\f1b6";
}
.fa-steam-square:before {
  content: "\f1b7";
}
.fa-recycle:before {
  content: "\f1b8";
}
.fa-automobile:before,
.fa-car:before {
  content: "\f1b9";
}
.fa-cab:before,
.fa-taxi:before {
  content: "\f1ba";
}
.fa-tree:before {
  content: "\f1bb";
}
.fa-spotify:before {
  content: "\f1bc";
}
.fa-deviantart:before {
  content: "\f1bd";
}
.fa-soundcloud:before {
  content: "\f1be";
}
.fa-database:before {
  content: "\f1c0";
}
.fa-file-pdf-o:before {
  content: "\f1c1";
}
.fa-file-word-o:before {
  content: "\f1c2";
}
.fa-file-excel-o:before {
  content: "\f1c3";
}
.fa-file-powerpoint-o:before {
  content: "\f1c4";
}
.fa-file-photo-o:before,
.fa-file-picture-o:before,
.fa-file-image-o:before {
  content: "\f1c5";
}
.fa-file-zip-o:before,
.fa-file-archive-o:before {
  content: "\f1c6";
}
.fa-file-sound-o:before,
.fa-file-audio-o:before {
  content: "\f1c7";
}
.fa-file-movie-o:before,
.fa-file-video-o:before {
  content: "\f1c8";
}
.fa-file-code-o:before {
  content: "\f1c9";
}
.fa-vine:before {
  content: "\f1ca";
}
.fa-codepen:before {
  content: "\f1cb";
}
.fa-jsfiddle:before {
  content: "\f1cc";
}
.fa-life-bouy:before,
.fa-life-buoy:before,
.fa-life-saver:before,
.fa-support:before,
.fa-life-ring:before {
  content: "\f1cd";
}
.fa-circle-o-notch:before {
  content: "\f1ce";
}
.fa-ra:before,
.fa-rebel:before {
  content: "\f1d0";
}
.fa-ge:before,
.fa-empire:before {
  content: "\f1d1";
}
.fa-git-square:before {
  content: "\f1d2";
}
.fa-git:before {
  content: "\f1d3";
}
.fa-hacker-news:before {
  content: "\f1d4";
}
.fa-tencent-weibo:before {
  content: "\f1d5";
}
.fa-qq:before {
  content: "\f1d6";
}
.fa-wechat:before,
.fa-weixin:before {
  content: "\f1d7";
}
.fa-send:before,
.fa-paper-plane:before {
  content: "\f1d8";
}
.fa-send-o:before,
.fa-paper-plane-o:before {
  content: "\f1d9";
}
.fa-history:before {
  content: "\f1da";
}
.fa-circle-thin:before {
  content: "\f1db";
}
.fa-header:before {
  content: "\f1dc";
}
.fa-paragraph:before {
  content: "\f1dd";
}
.fa-sliders:before {
  content: "\f1de";
}
.fa-share-alt:before {
  content: "\f1e0";
}
.fa-share-alt-square:before {
  content: "\f1e1";
}
.fa-bomb:before {
  content: "\f1e2";
}
.fa-soccer-ball-o:before,
.fa-futbol-o:before {
  content: "\f1e3";
}
.fa-tty:before {
  content: "\f1e4";
}
.fa-binoculars:before {
  content: "\f1e5";
}
.fa-plug:before {
  content: "\f1e6";
}
.fa-slideshare:before {
  content: "\f1e7";
}
.fa-twitch:before {
  content: "\f1e8";
}
.fa-yelp:before {
  content: "\f1e9";
}
.fa-newspaper-o:before {
  content: "\f1ea";
}
.fa-wifi:before {
  content: "\f1eb";
}
.fa-calculator:before {
  content: "\f1ec";
}
.fa-paypal:before {
  content: "\f1ed";
}
.fa-google-wallet:before {
  content: "\f1ee";
}
.fa-cc-visa:before {
  content: "\f1f0";
}
.fa-cc-mastercard:before {
  content: "\f1f1";
}
.fa-cc-discover:before {
  content: "\f1f2";
}
.fa-cc-amex:before {
  content: "\f1f3";
}
.fa-cc-paypal:before {
  content: "\f1f4";
}
.fa-cc-stripe:before {
  content: "\f1f5";
}
.fa-bell-slash:before {
  content: "\f1f6";
}
.fa-bell-slash-o:before {
  content: "\f1f7";
}
.fa-trash:before {
  content: "\f1f8";
}
.fa-copyright:before {
  content: "\f1f9";
}
.fa-at:before {
  content: "\f1fa";
}
.fa-eyedropper:before {
  content: "\f1fb";
}
.fa-paint-brush:before {
  content: "\f1fc";
}
.fa-birthday-cake:before {
  content: "\f1fd";
}
.fa-area-chart:before {
  content: "\f1fe";
}
.fa-pie-chart:before {
  content: "\f200";
}
.fa-line-chart:before {
  content: "\f201";
}
.fa-lastfm:before {
  content: "\f202";
}
.fa-lastfm-square:before {
  content: "\f203";
}
.fa-toggle-off:before {
  content: "\f204";
}
.fa-toggle-on:before {
  content: "\f205";
}
.fa-bicycle:before {
  content: "\f206";
}
.fa-bus:before {
  content: "\f207";
}
.fa-ioxhost:before {
  content: "\f208";
}
.fa-angellist:before {
  content: "\f209";
}
.fa-cc:before {
  content: "\f20a";
}
.fa-shekel:before,
.fa-sheqel:before,
.fa-ils:before {
  content: "\f20b";
}
.fa-meanpath:before {
  content: "\f20c";
}
/*!
*
* IPython base
*
*/
.modal.fade .modal-dialog {
  -webkit-transform: translate(0, 0);
  -ms-transform: translate(0, 0);
  -o-transform: translate(0, 0);
  transform: translate(0, 0);
}
code {
  color: #000;
}
pre {
  font-size: inherit;
  line-height: inherit;
}
label {
  font-weight: normal;
}
/* Make the page background atleast 100% the height of the view port */
/* Make the page itself atleast 70% the height of the view port */
.border-box-sizing {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}
.corner-all {
  border-radius: 2px;
}
.no-padding {
  padding: 0px;
}
/* Flexible box model classes */
/* Taken from Alex Russell http://infrequently.org/2009/08/css-3-progress/ */
/* This file is a compatability layer.  It allows the usage of flexible box 
model layouts accross multiple browsers, including older browsers.  The newest,
universal implementation of the flexible box model is used when available (see
`Modern browsers` comments below).  Browsers that are known to implement this 
new spec completely include:

    Firefox 28.0+
    Chrome 29.0+
    Internet Explorer 11+ 
    Opera 17.0+

Browsers not listed, including Safari, are supported via the styling under the
`Old browsers` comments below.
*/
.hbox {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.hbox > * {
  /* Old browsers */
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  box-flex: 0;
  /* Modern browsers */
  flex: none;
}
.vbox {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.vbox > * {
  /* Old browsers */
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  box-flex: 0;
  /* Modern browsers */
  flex: none;
}
.hbox.reverse,
.vbox.reverse,
.reverse {
  /* Old browsers */
  -webkit-box-direction: reverse;
  -moz-box-direction: reverse;
  box-direction: reverse;
  /* Modern browsers */
  flex-direction: row-reverse;
}
.hbox.box-flex0,
.vbox.box-flex0,
.box-flex0 {
  /* Old browsers */
  -webkit-box-flex: 0;
  -moz-box-flex: 0;
  box-flex: 0;
  /* Modern browsers */
  flex: none;
  width: auto;
}
.hbox.box-flex1,
.vbox.box-flex1,
.box-flex1 {
  /* Old browsers */
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
  /* Modern browsers */
  flex: 1;
}
.hbox.box-flex,
.vbox.box-flex,
.box-flex {
  /* Old browsers */
  /* Old browsers */
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
  /* Modern browsers */
  flex: 1;
}
.hbox.box-flex2,
.vbox.box-flex2,
.box-flex2 {
  /* Old browsers */
  -webkit-box-flex: 2;
  -moz-box-flex: 2;
  box-flex: 2;
  /* Modern browsers */
  flex: 2;
}
.box-group1 {
  /*  Deprecated */
  -webkit-box-flex-group: 1;
  -moz-box-flex-group: 1;
  box-flex-group: 1;
}
.box-group2 {
  /* Deprecated */
  -webkit-box-flex-group: 2;
  -moz-box-flex-group: 2;
  box-flex-group: 2;
}
.hbox.start,
.vbox.start,
.start {
  /* Old browsers */
  -webkit-box-pack: start;
  -moz-box-pack: start;
  box-pack: start;
  /* Modern browsers */
  justify-content: flex-start;
}
.hbox.end,
.vbox.end,
.end {
  /* Old browsers */
  -webkit-box-pack: end;
  -moz-box-pack: end;
  box-pack: end;
  /* Modern browsers */
  justify-content: flex-end;
}
.hbox.center,
.vbox.center,
.center {
  /* Old browsers */
  -webkit-box-pack: center;
  -moz-box-pack: center;
  box-pack: center;
  /* Modern browsers */
  justify-content: center;
}
.hbox.baseline,
.vbox.baseline,
.baseline {
  /* Old browsers */
  -webkit-box-pack: baseline;
  -moz-box-pack: baseline;
  box-pack: baseline;
  /* Modern browsers */
  justify-content: baseline;
}
.hbox.stretch,
.vbox.stretch,
.stretch {
  /* Old browsers */
  -webkit-box-pack: stretch;
  -moz-box-pack: stretch;
  box-pack: stretch;
  /* Modern browsers */
  justify-content: stretch;
}
.hbox.align-start,
.vbox.align-start,
.align-start {
  /* Old browsers */
  -webkit-box-align: start;
  -moz-box-align: start;
  box-align: start;
  /* Modern browsers */
  align-items: flex-start;
}
.hbox.align-end,
.vbox.align-end,
.align-end {
  /* Old browsers */
  -webkit-box-align: end;
  -moz-box-align: end;
  box-align: end;
  /* Modern browsers */
  align-items: flex-end;
}
.hbox.align-center,
.vbox.align-center,
.align-center {
  /* Old browsers */
  -webkit-box-align: center;
  -moz-box-align: center;
  box-align: center;
  /* Modern browsers */
  align-items: center;
}
.hbox.align-baseline,
.vbox.align-baseline,
.align-baseline {
  /* Old browsers */
  -webkit-box-align: baseline;
  -moz-box-align: baseline;
  box-align: baseline;
  /* Modern browsers */
  align-items: baseline;
}
.hbox.align-stretch,
.vbox.align-stretch,
.align-stretch {
  /* Old browsers */
  -webkit-box-align: stretch;
  -moz-box-align: stretch;
  box-align: stretch;
  /* Modern browsers */
  align-items: stretch;
}
div.error {
  margin: 2em;
  text-align: center;
}
div.error > h1 {
  font-size: 500%;
  line-height: normal;
}
div.error > p {
  font-size: 200%;
  line-height: normal;
}
div.traceback-wrapper {
  text-align: left;
  max-width: 800px;
  margin: auto;
}
/**
 * Primary styles
 *
 * Author: Jupyter Development Team
 */
body {
  background-color: #fff;
  /* This makes sure that the body covers the entire window and needs to
       be in a different element than the display: box in wrapper below */
  position: absolute;
  left: 0px;
  right: 0px;
  top: 0px;
  bottom: 0px;
  overflow: visible;
}
body > #header {
  /* Initially hidden to prevent FLOUC */
  display: none;
  background-color: #fff;
  /* Display over codemirror */
  position: relative;
  z-index: 100;
}
body > #header #header-container {
  padding-bottom: 5px;
  padding-top: 5px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}
body > #header .header-bar {
  width: 100%;
  height: 1px;
  background: #e7e7e7;
  margin-bottom: -1px;
}
@media print {
  body > #header {
    display: none !important;
  }
}
#header-spacer {
  width: 100%;
  visibility: hidden;
}
@media print {
  #header-spacer {
    display: none;
  }
}
#ipython_notebook {
  padding-left: 0px;
  padding-top: 1px;
  padding-bottom: 1px;
}
@media (max-width: 991px) {
  #ipython_notebook {
    margin-left: 10px;
  }
}
#noscript {
  width: auto;
  padding-top: 16px;
  padding-bottom: 16px;
  text-align: center;
  font-size: 22px;
  color: red;
  font-weight: bold;
}
#ipython_notebook img {
  height: 28px;
}
#site {
  width: 100%;
  display: none;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  overflow: auto;
}
@media print {
  #site {
    height: auto !important;
  }
}
/* Smaller buttons */
.ui-button .ui-button-text {
  padding: 0.2em 0.8em;
  font-size: 77%;
}
input.ui-button {
  padding: 0.3em 0.9em;
}
span#login_widget {
  float: right;
}
span#login_widget > .button,
#logout {
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}
span#login_widget > .button:focus,
#logout:focus,
span#login_widget > .button.focus,
#logout.focus {
  color: #333;
  background-color: #e6e6e6;
  border-color: #8c8c8c;
}
span#login_widget > .button:hover,
#logout:hover {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
span#login_widget > .button:active,
#logout:active,
span#login_widget > .button.active,
#logout.active,
.open > .dropdown-togglespan#login_widget > .button,
.open > .dropdown-toggle#logout {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
span#login_widget > .button:active:hover,
#logout:active:hover,
span#login_widget > .button.active:hover,
#logout.active:hover,
.open > .dropdown-togglespan#login_widget > .button:hover,
.open > .dropdown-toggle#logout:hover,
span#login_widget > .button:active:focus,
#logout:active:focus,
span#login_widget > .button.active:focus,
#logout.active:focus,
.open > .dropdown-togglespan#login_widget > .button:focus,
.open > .dropdown-toggle#logout:focus,
span#login_widget > .button:active.focus,
#logout:active.focus,
span#login_widget > .button.active.focus,
#logout.active.focus,
.open > .dropdown-togglespan#login_widget > .button.focus,
.open > .dropdown-toggle#logout.focus {
  color: #333;
  background-color: #d4d4d4;
  border-color: #8c8c8c;
}
span#login_widget > .button:active,
#logout:active,
span#login_widget > .button.active,
#logout.active,
.open > .dropdown-togglespan#login_widget > .button,
.open > .dropdown-toggle#logout {
  background-image: none;
}
span#login_widget > .button.disabled:hover,
#logout.disabled:hover,
span#login_widget > .button[disabled]:hover,
#logout[disabled]:hover,
fieldset[disabled] span#login_widget > .button:hover,
fieldset[disabled] #logout:hover,
span#login_widget > .button.disabled:focus,
#logout.disabled:focus,
span#login_widget > .button[disabled]:focus,
#logout[disabled]:focus,
fieldset[disabled] span#login_widget > .button:focus,
fieldset[disabled] #logout:focus,
span#login_widget > .button.disabled.focus,
#logout.disabled.focus,
span#login_widget > .button[disabled].focus,
#logout[disabled].focus,
fieldset[disabled] span#login_widget > .button.focus,
fieldset[disabled] #logout.focus {
  background-color: #fff;
  border-color: #ccc;
}
span#login_widget > .button .badge,
#logout .badge {
  color: #fff;
  background-color: #333;
}
.nav-header {
  text-transform: none;
}
#header > span {
  margin-top: 10px;
}
.modal_stretch .modal-dialog {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 80vh;
}
.modal_stretch .modal-dialog .modal-body {
  max-height: calc(100vh - 200px);
  overflow: auto;
  flex: 1;
}
@media (min-width: 768px) {
  .modal .modal-dialog {
    width: 700px;
  }
}
@media (min-width: 768px) {
  select.form-control {
    margin-left: 12px;
    margin-right: 12px;
  }
}
/*!
*
* IPython auth
*
*/
.center-nav {
  display: inline-block;
  margin-bottom: -4px;
}
/*!
*
* IPython tree view
*
*/
/* We need an invisible input field on top of the sentense*/
/* "Drag file onto the list ..." */
.alternate_upload {
  background-color: none;
  display: inline;
}
.alternate_upload.form {
  padding: 0;
  margin: 0;
}
.alternate_upload input.fileinput {
  text-align: center;
  vertical-align: middle;
  display: inline;
  opacity: 0;
  z-index: 2;
  width: 12ex;
  margin-right: -12ex;
}
.alternate_upload .btn-upload {
  height: 22px;
}
/**
 * Primary styles
 *
 * Author: Jupyter Development Team
 */
ul#tabs {
  margin-bottom: 4px;
}
ul#tabs a {
  padding-top: 6px;
  padding-bottom: 4px;
}
ul.breadcrumb a:focus,
ul.breadcrumb a:hover {
  text-decoration: none;
}
ul.breadcrumb i.icon-home {
  font-size: 16px;
  margin-right: 4px;
}
ul.breadcrumb span {
  color: #5e5e5e;
}
.list_toolbar {
  padding: 4px 0 4px 0;
  vertical-align: middle;
}
.list_toolbar .tree-buttons {
  padding-top: 1px;
}
.dynamic-buttons {
  padding-top: 3px;
  display: inline-block;
}
.list_toolbar [class*="span"] {
  min-height: 24px;
}
.list_header {
  font-weight: bold;
  background-color: #EEE;
}
.list_placeholder {
  font-weight: bold;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 7px;
  padding-right: 7px;
}
.list_container {
  margin-top: 4px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 2px;
}
.list_container > div {
  border-bottom: 1px solid #ddd;
}
.list_container > div:hover .list-item {
  background-color: red;
}
.list_container > div:last-child {
  border: none;
}
.list_item:hover .list_item {
  background-color: #ddd;
}
.list_item a {
  text-decoration: none;
}
.list_item:hover {
  background-color: #fafafa;
}
.list_header > div,
.list_item > div {
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 7px;
  padding-right: 7px;
  line-height: 22px;
}
.list_header > div input,
.list_item > div input {
  margin-right: 7px;
  margin-left: 14px;
  vertical-align: baseline;
  line-height: 22px;
  position: relative;
  top: -1px;
}
.list_header > div .item_link,
.list_item > div .item_link {
  margin-left: -1px;
  vertical-align: baseline;
  line-height: 22px;
}
.new-file input[type=checkbox] {
  visibility: hidden;
}
.item_name {
  line-height: 22px;
  height: 24px;
}
.item_icon {
  font-size: 14px;
  color: #5e5e5e;
  margin-right: 7px;
  margin-left: 7px;
  line-height: 22px;
  vertical-align: baseline;
}
.item_buttons {
  line-height: 1em;
  margin-left: -5px;
}
.item_buttons .btn,
.item_buttons .btn-group,
.item_buttons .input-group {
  float: left;
}
.item_buttons > .btn,
.item_buttons > .btn-group,
.item_buttons > .input-group {
  margin-left: 5px;
}
.item_buttons .btn {
  min-width: 13ex;
}
.item_buttons .running-indicator {
  padding-top: 4px;
  color: #5cb85c;
}
.item_buttons .kernel-name {
  padding-top: 4px;
  color: #5bc0de;
  margin-right: 7px;
  float: left;
}
.toolbar_info {
  height: 24px;
  line-height: 24px;
}
.list_item input:not([type=checkbox]) {
  padding-top: 3px;
  padding-bottom: 3px;
  height: 22px;
  line-height: 14px;
  margin: 0px;
}
.highlight_text {
  color: blue;
}
#project_name {
  display: inline-block;
  padding-left: 7px;
  margin-left: -2px;
}
#project_name > .breadcrumb {
  padding: 0px;
  margin-bottom: 0px;
  background-color: transparent;
  font-weight: bold;
}
#tree-selector {
  padding-right: 0px;
}
#button-select-all {
  min-width: 50px;
}
#select-all {
  margin-left: 7px;
  margin-right: 2px;
}
.menu_icon {
  margin-right: 2px;
}
.tab-content .row {
  margin-left: 0px;
  margin-right: 0px;
}
.folder_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f114";
}
.folder_icon:before.pull-left {
  margin-right: .3em;
}
.folder_icon:before.pull-right {
  margin-left: .3em;
}
.notebook_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f02d";
  position: relative;
  top: -1px;
}
.notebook_icon:before.pull-left {
  margin-right: .3em;
}
.notebook_icon:before.pull-right {
  margin-left: .3em;
}
.running_notebook_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f02d";
  position: relative;
  top: -1px;
  color: #5cb85c;
}
.running_notebook_icon:before.pull-left {
  margin-right: .3em;
}
.running_notebook_icon:before.pull-right {
  margin-left: .3em;
}
.file_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f016";
  position: relative;
  top: -2px;
}
.file_icon:before.pull-left {
  margin-right: .3em;
}
.file_icon:before.pull-right {
  margin-left: .3em;
}
#notebook_toolbar .pull-right {
  padding-top: 0px;
  margin-right: -1px;
}
ul#new-menu {
  left: auto;
  right: 0;
}
.kernel-menu-icon {
  padding-right: 12px;
  width: 24px;
  content: "\f096";
}
.kernel-menu-icon:before {
  content: "\f096";
}
.kernel-menu-icon-current:before {
  content: "\f00c";
}
#tab_content {
  padding-top: 20px;
}
#running .panel-group .panel {
  margin-top: 3px;
  margin-bottom: 1em;
}
#running .panel-group .panel .panel-heading {
  background-color: #EEE;
  padding-top: 4px;
  padding-bottom: 4px;
  padding-left: 7px;
  padding-right: 7px;
  line-height: 22px;
}
#running .panel-group .panel .panel-heading a:focus,
#running .panel-group .panel .panel-heading a:hover {
  text-decoration: none;
}
#running .panel-group .panel .panel-body {
  padding: 0px;
}
#running .panel-group .panel .panel-body .list_container {
  margin-top: 0px;
  margin-bottom: 0px;
  border: 0px;
  border-radius: 0px;
}
#running .panel-group .panel .panel-body .list_container .list_item {
  border-bottom: 1px solid #ddd;
}
#running .panel-group .panel .panel-body .list_container .list_item:last-child {
  border-bottom: 0px;
}
.delete-button {
  display: none;
}
.duplicate-button {
  display: none;
}
.rename-button {
  display: none;
}
.shutdown-button {
  display: none;
}
.dynamic-instructions {
  display: inline-block;
  padding-top: 4px;
}
/*!
*
* IPython text editor webapp
*
*/
.selected-keymap i.fa {
  padding: 0px 5px;
}
.selected-keymap i.fa:before {
  content: "\f00c";
}
#mode-menu {
  overflow: auto;
  max-height: 20em;
}
.edit_app #header {
  -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
}
.edit_app #menubar .navbar {
  /* Use a negative 1 bottom margin, so the border overlaps the border of the
    header */
  margin-bottom: -1px;
}
.dirty-indicator {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 20px;
}
.dirty-indicator.pull-left {
  margin-right: .3em;
}
.dirty-indicator.pull-right {
  margin-left: .3em;
}
.dirty-indicator-dirty {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 20px;
}
.dirty-indicator-dirty.pull-left {
  margin-right: .3em;
}
.dirty-indicator-dirty.pull-right {
  margin-left: .3em;
}
.dirty-indicator-clean {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  width: 20px;
}
.dirty-indicator-clean.pull-left {
  margin-right: .3em;
}
.dirty-indicator-clean.pull-right {
  margin-left: .3em;
}
.dirty-indicator-clean:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f00c";
}
.dirty-indicator-clean:before.pull-left {
  margin-right: .3em;
}
.dirty-indicator-clean:before.pull-right {
  margin-left: .3em;
}
#filename {
  font-size: 16pt;
  display: table;
  padding: 0px 5px;
}
#current-mode {
  padding-left: 5px;
  padding-right: 5px;
}
#texteditor-backdrop {
  padding-top: 20px;
  padding-bottom: 20px;
}
@media not print {
  #texteditor-backdrop {
    background-color: #EEE;
  }
}
@media print {
  #texteditor-backdrop #texteditor-container .CodeMirror-gutter,
  #texteditor-backdrop #texteditor-container .CodeMirror-gutters {
    background-color: #fff;
  }
}
@media not print {
  #texteditor-backdrop #texteditor-container .CodeMirror-gutter,
  #texteditor-backdrop #texteditor-container .CodeMirror-gutters {
    background-color: #fff;
  }
}
@media not print {
  #texteditor-backdrop #texteditor-container {
    padding: 0px;
    background-color: #fff;
    -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
    box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  }
}
/*!
*
* IPython notebook
*
*/
/* CSS font colors for translated ANSI colors. */
.ansibold {
  font-weight: bold;
}
/* use dark versions for foreground, to improve visibility */
.ansiblack {
  color: black;
}
.ansired {
  color: darkred;
}
.ansigreen {
  color: darkgreen;
}
.ansiyellow {
  color: #c4a000;
}
.ansiblue {
  color: darkblue;
}
.ansipurple {
  color: darkviolet;
}
.ansicyan {
  color: steelblue;
}
.ansigray {
  color: gray;
}
/* and light for background, for the same reason */
.ansibgblack {
  background-color: black;
}
.ansibgred {
  background-color: red;
}
.ansibggreen {
  background-color: green;
}
.ansibgyellow {
  background-color: yellow;
}
.ansibgblue {
  background-color: blue;
}
.ansibgpurple {
  background-color: magenta;
}
.ansibgcyan {
  background-color: cyan;
}
.ansibggray {
  background-color: gray;
}
div.cell {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-radius: 2px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  border-width: 1px;
  border-style: solid;
  border-color: transparent;
  width: 100%;
  padding: 5px;
  /* This acts as a spacer between cells, that is outside the border */
  margin: 0px;
  outline: none;
  border-left-width: 1px;
  padding-left: 5px;
  background: linear-gradient(to right, transparent -40px, transparent 1px, transparent 1px, transparent 100%);
}
div.cell.jupyter-soft-selected {
  border-left-color: #90CAF9;
  border-left-color: #E3F2FD;
  border-left-width: 1px;
  padding-left: 5px;
  border-right-color: #E3F2FD;
  border-right-width: 1px;
  background: #E3F2FD;
}
@media print {
  div.cell.jupyter-soft-selected {
    border-color: transparent;
  }
}
div.cell.selected {
  border-color: #ababab;
  border-left-width: 0px;
  padding-left: 6px;
  background: linear-gradient(to right, #42A5F5 -40px, #42A5F5 5px, transparent 5px, transparent 100%);
}
@media print {
  div.cell.selected {
    border-color: transparent;
  }
}
div.cell.selected.jupyter-soft-selected {
  border-left-width: 0;
  padding-left: 6px;
  background: linear-gradient(to right, #42A5F5 -40px, #42A5F5 7px, #E3F2FD 7px, #E3F2FD 100%);
}
.edit_mode div.cell.selected {
  border-color: #66BB6A;
  border-left-width: 0px;
  padding-left: 6px;
  background: linear-gradient(to right, #66BB6A -40px, #66BB6A 5px, transparent 5px, transparent 100%);
}
@media print {
  .edit_mode div.cell.selected {
    border-color: transparent;
  }
}
.prompt {
  /* This needs to be wide enough for 3 digit prompt numbers: In[100]: */
  min-width: 14ex;
  /* This padding is tuned to match the padding on the CodeMirror editor. */
  padding: 0.4em;
  margin: 0px;
  font-family: monospace;
  text-align: right;
  /* This has to match that of the the CodeMirror class line-height below */
  line-height: 1.21429em;
  /* Don't highlight prompt number selection */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  /* Use default cursor */
  cursor: default;
}
@media (max-width: 540px) {
  .prompt {
    text-align: left;
  }
}
div.inner_cell {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Old browsers */
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
  /* Modern browsers */
  flex: 1;
}
@-moz-document url-prefix() {
  div.inner_cell {
    overflow-x: hidden;
  }
}
/* input_area and input_prompt must match in top border and margin for alignment */
div.input_area {
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  background: #f7f7f7;
  line-height: 1.21429em;
}
/* This is needed so that empty prompt areas can collapse to zero height when there
   is no content in the output_subarea and the prompt. The main purpose of this is
   to make sure that empty JavaScript output_subareas have no height. */
div.prompt:empty {
  padding-top: 0;
  padding-bottom: 0;
}
div.unrecognized_cell {
  padding: 5px 5px 5px 0px;
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
div.unrecognized_cell .inner_cell {
  border-radius: 2px;
  padding: 5px;
  font-weight: bold;
  color: red;
  border: 1px solid #cfcfcf;
  background: #eaeaea;
}
div.unrecognized_cell .inner_cell a {
  color: inherit;
  text-decoration: none;
}
div.unrecognized_cell .inner_cell a:hover {
  color: inherit;
  text-decoration: none;
}
@media (max-width: 540px) {
  div.unrecognized_cell > div.prompt {
    display: none;
  }
}
div.code_cell {
  /* avoid page breaking on code cells when printing */
}
@media print {
  div.code_cell {
    page-break-inside: avoid;
  }
}
/* any special styling for code cells that are currently running goes here */
div.input {
  page-break-inside: avoid;
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
@media (max-width: 540px) {
  div.input {
    /* Old browsers */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-align: stretch;
    display: -moz-box;
    -moz-box-orient: vertical;
    -moz-box-align: stretch;
    display: box;
    box-orient: vertical;
    box-align: stretch;
    /* Modern browsers */
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}
/* input_area and input_prompt must match in top border and margin for alignment */
div.input_prompt {
  color: #303F9F;
  border-top: 1px solid transparent;
}
div.input_area > div.highlight {
  margin: 0.4em;
  border: none;
  padding: 0px;
  background-color: transparent;
}
div.input_area > div.highlight > pre {
  margin: 0px;
  border: none;
  padding: 0px;
  background-color: transparent;
}
/* The following gets added to the <head> if it is detected that the user has a
 * monospace font with inconsistent normal/bold/italic height.  See
 * notebookmain.js.  Such fonts will have keywords vertically offset with
 * respect to the rest of the text.  The user should select a better font.
 * See: https://github.com/ipython/ipython/issues/1503
 *
 * .CodeMirror span {
 *      vertical-align: bottom;
 * }
 */
.CodeMirror {
  line-height: 1.21429em;
  /* Changed from 1em to our global default */
  font-size: 14px;
  height: auto;
  /* Changed to auto to autogrow */
  background: none;
  /* Changed from white to allow our bg to show through */
}
.CodeMirror-scroll {
  /*  The CodeMirror docs are a bit fuzzy on if overflow-y should be hidden or visible.*/
  /*  We have found that if it is visible, vertical scrollbars appear with font size changes.*/
  overflow-y: hidden;
  overflow-x: auto;
}
.CodeMirror-lines {
  /* In CM2, this used to be 0.4em, but in CM3 it went to 4px. We need the em value because */
  /* we have set a different line-height and want this to scale with that. */
  padding: 0.4em;
}
.CodeMirror-linenumber {
  padding: 0 8px 0 4px;
}
.CodeMirror-gutters {
  border-bottom-left-radius: 2px;
  border-top-left-radius: 2px;
}
.CodeMirror pre {
  /* In CM3 this went to 4px from 0 in CM2. We need the 0 value because of how we size */
  /* .CodeMirror-lines */
  padding: 0;
  border: 0;
  border-radius: 0;
}
/*

Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org>
Adapted from GitHub theme

*/
.highlight-base {
  color: #000;
}
.highlight-variable {
  color: #000;
}
.highlight-variable-2 {
  color: #1a1a1a;
}
.highlight-variable-3 {
  color: #333333;
}
.highlight-string {
  color: #BA2121;
}
.highlight-comment {
  color: #408080;
  font-style: italic;
}
.highlight-number {
  color: #080;
}
.highlight-atom {
  color: #88F;
}
.highlight-keyword {
  color: #008000;
  font-weight: bold;
}
.highlight-builtin {
  color: #008000;
}
.highlight-error {
  color: #f00;
}
.highlight-operator {
  color: #AA22FF;
  font-weight: bold;
}
.highlight-meta {
  color: #AA22FF;
}
/* previously not defined, copying from default codemirror */
.highlight-def {
  color: #00f;
}
.highlight-string-2 {
  color: #f50;
}
.highlight-qualifier {
  color: #555;
}
.highlight-bracket {
  color: #997;
}
.highlight-tag {
  color: #170;
}
.highlight-attribute {
  color: #00c;
}
.highlight-header {
  color: blue;
}
.highlight-quote {
  color: #090;
}
.highlight-link {
  color: #00c;
}
/* apply the same style to codemirror */
.cm-s-ipython span.cm-keyword {
  color: #008000;
  font-weight: bold;
}
.cm-s-ipython span.cm-atom {
  color: #88F;
}
.cm-s-ipython span.cm-number {
  color: #080;
}
.cm-s-ipython span.cm-def {
  color: #00f;
}
.cm-s-ipython span.cm-variable {
  color: #000;
}
.cm-s-ipython span.cm-operator {
  color: #AA22FF;
  font-weight: bold;
}
.cm-s-ipython span.cm-variable-2 {
  color: #1a1a1a;
}
.cm-s-ipython span.cm-variable-3 {
  color: #333333;
}
.cm-s-ipython span.cm-comment {
  color: #408080;
  font-style: italic;
}
.cm-s-ipython span.cm-string {
  color: #BA2121;
}
.cm-s-ipython span.cm-string-2 {
  color: #f50;
}
.cm-s-ipython span.cm-meta {
  color: #AA22FF;
}
.cm-s-ipython span.cm-qualifier {
  color: #555;
}
.cm-s-ipython span.cm-builtin {
  color: #008000;
}
.cm-s-ipython span.cm-bracket {
  color: #997;
}
.cm-s-ipython span.cm-tag {
  color: #170;
}
.cm-s-ipython span.cm-attribute {
  color: #00c;
}
.cm-s-ipython span.cm-header {
  color: blue;
}
.cm-s-ipython span.cm-quote {
  color: #090;
}
.cm-s-ipython span.cm-link {
  color: #00c;
}
.cm-s-ipython span.cm-error {
  color: #f00;
}
.cm-s-ipython span.cm-tab {
  background: url();
  background-position: right;
  background-repeat: no-repeat;
}
div.output_wrapper {
  /* this position must be relative to enable descendents to be absolute within it */
  position: relative;
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  z-index: 1;
}
/* class for the output area when it should be height-limited */
div.output_scroll {
  /* ideally, this would be max-height, but FF barfs all over that */
  height: 24em;
  /* FF needs this *and the wrapper* to specify full width, or it will shrinkwrap */
  width: 100%;
  overflow: auto;
  border-radius: 2px;
  -webkit-box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
  display: block;
}
/* output div while it is collapsed */
div.output_collapsed {
  margin: 0px;
  padding: 0px;
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
div.out_prompt_overlay {
  height: 100%;
  padding: 0px 0.4em;
  position: absolute;
  border-radius: 2px;
}
div.out_prompt_overlay:hover {
  /* use inner shadow to get border that is computed the same on WebKit/FF */
  -webkit-box-shadow: inset 0 0 1px #000;
  box-shadow: inset 0 0 1px #000;
  background: rgba(240, 240, 240, 0.5);
}
div.output_prompt {
  color: #D84315;
}
/* This class is the outer container of all output sections. */
div.output_area {
  padding: 0px;
  page-break-inside: avoid;
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
div.output_area .MathJax_Display {
  text-align: left !important;
}
div.output_area .rendered_html table {
  margin-left: 0;
  margin-right: 0;
}
div.output_area .rendered_html img {
  margin-left: 0;
  margin-right: 0;
}
div.output_area img,
div.output_area svg {
  max-width: 100%;
  height: auto;
}
div.output_area img.unconfined,
div.output_area svg.unconfined {
  max-width: none;
}
/* This is needed to protect the pre formating from global settings such
   as that of bootstrap */
.output {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: vertical;
  -moz-box-align: stretch;
  display: box;
  box-orient: vertical;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
@media (max-width: 540px) {
  div.output_area {
    /* Old browsers */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-box-align: stretch;
    display: -moz-box;
    -moz-box-orient: vertical;
    -moz-box-align: stretch;
    display: box;
    box-orient: vertical;
    box-align: stretch;
    /* Modern browsers */
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
}
div.output_area pre {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
  color: black;
  background-color: transparent;
  border-radius: 0;
}
/* This class is for the output subarea inside the output_area and after
   the prompt div. */
div.output_subarea {
  overflow-x: auto;
  padding: 0.4em;
  /* Old browsers */
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
  /* Modern browsers */
  flex: 1;
  max-width: calc(100% - 14ex);
}
div.output_scroll div.output_subarea {
  overflow-x: visible;
}
/* The rest of the output_* classes are for special styling of the different
   output types */
/* all text output has this class: */
div.output_text {
  text-align: left;
  color: #000;
  /* This has to match that of the the CodeMirror class line-height below */
  line-height: 1.21429em;
}
/* stdout/stderr are 'text' as well as 'stream', but execute_result/error are *not* streams */
div.output_stderr {
  background: #fdd;
  /* very light red background for stderr */
}
div.output_latex {
  text-align: left;
}
/* Empty output_javascript divs should have no height */
div.output_javascript:empty {
  padding: 0;
}
.js-error {
  color: darkred;
}
/* raw_input styles */
div.raw_input_container {
  line-height: 1.21429em;
  padding-top: 5px;
}
pre.raw_input_prompt {
  /* nothing needed here. */
}
input.raw_input {
  font-family: monospace;
  font-size: inherit;
  color: inherit;
  width: auto;
  /* make sure input baseline aligns with prompt */
  vertical-align: baseline;
  /* padding + margin = 0.5em between prompt and cursor */
  padding: 0em 0.25em;
  margin: 0em 0.25em;
}
input.raw_input:focus {
  box-shadow: none;
}
p.p-space {
  margin-bottom: 10px;
}
div.output_unrecognized {
  padding: 5px;
  font-weight: bold;
  color: red;
}
div.output_unrecognized a {
  color: inherit;
  text-decoration: none;
}
div.output_unrecognized a:hover {
  color: inherit;
  text-decoration: none;
}
.rendered_html {
  color: #000;
  /* any extras will just be numbers: */
}
.rendered_html em {
  font-style: italic;
}
.rendered_html strong {
  font-weight: bold;
}
.rendered_html u {
  text-decoration: underline;
}
.rendered_html :link {
  text-decoration: underline;
}
.rendered_html :visited {
  text-decoration: underline;
}
.rendered_html h1 {
  font-size: 185.7%;
  margin: 1.08em 0 0 0;
  font-weight: bold;
  line-height: 1.0;
}
.rendered_html h2 {
  font-size: 157.1%;
  margin: 1.27em 0 0 0;
  font-weight: bold;
  line-height: 1.0;
}
.rendered_html h3 {
  font-size: 128.6%;
  margin: 1.55em 0 0 0;
  font-weight: bold;
  line-height: 1.0;
}
.rendered_html h4 {
  font-size: 100%;
  margin: 2em 0 0 0;
  font-weight: bold;
  line-height: 1.0;
}
.rendered_html h5 {
  font-size: 100%;
  margin: 2em 0 0 0;
  font-weight: bold;
  line-height: 1.0;
  font-style: italic;
}
.rendered_html h6 {
  font-size: 100%;
  margin: 2em 0 0 0;
  font-weight: bold;
  line-height: 1.0;
  font-style: italic;
}
.rendered_html h1:first-child {
  margin-top: 0.538em;
}
.rendered_html h2:first-child {
  margin-top: 0.636em;
}
.rendered_html h3:first-child {
  margin-top: 0.777em;
}
.rendered_html h4:first-child {
  margin-top: 1em;
}
.rendered_html h5:first-child {
  margin-top: 1em;
}
.rendered_html h6:first-child {
  margin-top: 1em;
}
.rendered_html ul {
  list-style: disc;
  margin: 0em 2em;
  padding-left: 0px;
}
.rendered_html ul ul {
  list-style: square;
  margin: 0em 2em;
}
.rendered_html ul ul ul {
  list-style: circle;
  margin: 0em 2em;
}
.rendered_html ol {
  list-style: decimal;
  margin: 0em 2em;
  padding-left: 0px;
}
.rendered_html ol ol {
  list-style: upper-alpha;
  margin: 0em 2em;
}
.rendered_html ol ol ol {
  list-style: lower-alpha;
  margin: 0em 2em;
}
.rendered_html ol ol ol ol {
  list-style: lower-roman;
  margin: 0em 2em;
}
.rendered_html ol ol ol ol ol {
  list-style: decimal;
  margin: 0em 2em;
}
.rendered_html * + ul {
  margin-top: 1em;
}
.rendered_html * + ol {
  margin-top: 1em;
}
.rendered_html hr {
  color: black;
  background-color: black;
}
.rendered_html pre {
  margin: 1em 2em;
}
.rendered_html pre,
.rendered_html code {
  border: 0;
  background-color: #fff;
  color: #000;
  font-size: 100%;
  padding: 0px;
}
.rendered_html blockquote {
  margin: 1em 2em;
}
.rendered_html table {
  margin-left: auto;
  margin-right: auto;
  border: 1px solid black;
  border-collapse: collapse;
}
.rendered_html tr,
.rendered_html th,
.rendered_html td {
  border: 1px solid black;
  border-collapse: collapse;
  margin: 1em 2em;
}
.rendered_html td,
.rendered_html th {
  text-align: left;
  vertical-align: middle;
  padding: 4px;
}
.rendered_html th {
  font-weight: bold;
}
.rendered_html * + table {
  margin-top: 1em;
}
.rendered_html p {
  text-align: left;
}
.rendered_html * + p {
  margin-top: 1em;
}
.rendered_html img {
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.rendered_html * + img {
  margin-top: 1em;
}
.rendered_html img,
.rendered_html svg {
  max-width: 100%;
  height: auto;
}
.rendered_html img.unconfined,
.rendered_html svg.unconfined {
  max-width: none;
}
div.text_cell {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
@media (max-width: 540px) {
  div.text_cell > div.prompt {
    display: none;
  }
}
div.text_cell_render {
  /*font-family: "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;*/
  outline: none;
  resize: none;
  width: inherit;
  border-style: none;
  padding: 0.5em 0.5em 0.5em 0.4em;
  color: #000;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}
a.anchor-link:link {
  text-decoration: none;
  padding: 0px 20px;
  visibility: hidden;
}
h1:hover .anchor-link,
h2:hover .anchor-link,
h3:hover .anchor-link,
h4:hover .anchor-link,
h5:hover .anchor-link,
h6:hover .anchor-link {
  visibility: visible;
}
.text_cell.rendered .input_area {
  display: none;
}
.text_cell.rendered .rendered_html {
  overflow-x: auto;
  overflow-y: hidden;
}
.text_cell.unrendered .text_cell_render {
  display: none;
}
.cm-header-1,
.cm-header-2,
.cm-header-3,
.cm-header-4,
.cm-header-5,
.cm-header-6 {
  font-weight: bold;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.cm-header-1 {
  font-size: 185.7%;
}
.cm-header-2 {
  font-size: 157.1%;
}
.cm-header-3 {
  font-size: 128.6%;
}
.cm-header-4 {
  font-size: 110%;
}
.cm-header-5 {
  font-size: 100%;
  font-style: italic;
}
.cm-header-6 {
  font-size: 100%;
  font-style: italic;
}
/*!
*
* IPython notebook webapp
*
*/
@media (max-width: 767px) {
  .notebook_app {
    padding-left: 0px;
    padding-right: 0px;
  }
}
#ipython-main-app {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  height: 100%;
}
div#notebook_panel {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  height: 100%;
}
div#notebook {
  font-size: 14px;
  line-height: 20px;
  overflow-y: hidden;
  overflow-x: auto;
  width: 100%;
  /* This spaces the page away from the edge of the notebook area */
  padding-top: 20px;
  margin: 0px;
  outline: none;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  min-height: 100%;
}
@media not print {
  #notebook-container {
    padding: 15px;
    background-color: #fff;
    min-height: 0;
    -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
    box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  }
}
@media print {
  #notebook-container {
    width: 100%;
  }
}
div.ui-widget-content {
  border: 1px solid #ababab;
  outline: none;
}
pre.dialog {
  background-color: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 2px;
  padding: 0.4em;
  padding-left: 2em;
}
p.dialog {
  padding: 0.2em;
}
/* Word-wrap output correctly.  This is the CSS3 spelling, though Firefox seems
   to not honor it correctly.  Webkit browsers (Chrome, rekonq, Safari) do.
 */
pre,
code,
kbd,
samp {
  white-space: pre-wrap;
}
#fonttest {
  font-family: monospace;
}
p {
  margin-bottom: 0;
}
.end_space {
  min-height: 100px;
  transition: height .2s ease;
}
.notebook_app > #header {
  -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
}
@media not print {
  .notebook_app {
    background-color: #EEE;
  }
}
kbd {
  border-style: solid;
  border-width: 1px;
  box-shadow: none;
  margin: 2px;
  padding-left: 2px;
  padding-right: 2px;
  padding-top: 1px;
  padding-bottom: 1px;
}
/* CSS for the cell toolbar */
.celltoolbar {
  border: thin solid #CFCFCF;
  border-bottom: none;
  background: #EEE;
  border-radius: 2px 2px 0px 0px;
  width: 100%;
  height: 29px;
  padding-right: 4px;
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* Old browsers */
  -webkit-box-pack: end;
  -moz-box-pack: end;
  box-pack: end;
  /* Modern browsers */
  justify-content: flex-end;
  display: -webkit-flex;
}
@media print {
  .celltoolbar {
    display: none;
  }
}
.ctb_hideshow {
  display: none;
  vertical-align: bottom;
}
/* ctb_show is added to the ctb_hideshow div to show the cell toolbar.
   Cell toolbars are only shown when the ctb_global_show class is also set.
*/
.ctb_global_show .ctb_show.ctb_hideshow {
  display: block;
}
.ctb_global_show .ctb_show + .input_area,
.ctb_global_show .ctb_show + div.text_cell_input,
.ctb_global_show .ctb_show ~ div.text_cell_render {
  border-top-right-radius: 0px;
  border-top-left-radius: 0px;
}
.ctb_global_show .ctb_show ~ div.text_cell_render {
  border: 1px solid #cfcfcf;
}
.celltoolbar {
  font-size: 87%;
  padding-top: 3px;
}
.celltoolbar select {
  display: block;
  width: 100%;
  height: 32px;
  padding: 6px 12px;
  font-size: 13px;
  line-height: 1.42857143;
  color: #555555;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ccc;
  border-radius: 2px;
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  height: 30px;
  padding: 5px 10px;
  font-size: 12px;
  line-height: 1.5;
  border-radius: 1px;
  width: inherit;
  font-size: inherit;
  height: 22px;
  padding: 0px;
  display: inline-block;
}
.celltoolbar select:focus {
  border-color: #66afe9;
  outline: 0;
  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.celltoolbar select::-moz-placeholder {
  color: #999;
  opacity: 1;
}
.celltoolbar select:-ms-input-placeholder {
  color: #999;
}
.celltoolbar select::-webkit-input-placeholder {
  color: #999;
}
.celltoolbar select::-ms-expand {
  border: 0;
  background-color: transparent;
}
.celltoolbar select[disabled],
.celltoolbar select[readonly],
fieldset[disabled] .celltoolbar select {
  background-color: #eeeeee;
  opacity: 1;
}
.celltoolbar select[disabled],
fieldset[disabled] .celltoolbar select {
  cursor: not-allowed;
}
textarea.celltoolbar select {
  height: auto;
}
select.celltoolbar select {
  height: 30px;
  line-height: 30px;
}
textarea.celltoolbar select,
select[multiple].celltoolbar select {
  height: auto;
}
.celltoolbar label {
  margin-left: 5px;
  margin-right: 5px;
}
.completions {
  position: absolute;
  z-index: 110;
  overflow: hidden;
  border: 1px solid #ababab;
  border-radius: 2px;
  -webkit-box-shadow: 0px 6px 10px -1px #adadad;
  box-shadow: 0px 6px 10px -1px #adadad;
  line-height: 1;
}
.completions select {
  background: white;
  outline: none;
  border: none;
  padding: 0px;
  margin: 0px;
  overflow: auto;
  font-family: monospace;
  font-size: 110%;
  color: #000;
  width: auto;
}
.completions select option.context {
  color: #286090;
}
#kernel_logo_widget {
  float: right !important;
  float: right;
}
#kernel_logo_widget .current_kernel_logo {
  display: none;
  margin-top: -1px;
  margin-bottom: -1px;
  width: 32px;
  height: 32px;
}
#menubar {
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  margin-top: 1px;
}
#menubar .navbar {
  border-top: 1px;
  border-radius: 0px 0px 2px 2px;
  margin-bottom: 0px;
}
#menubar .navbar-toggle {
  float: left;
  padding-top: 7px;
  padding-bottom: 7px;
  border: none;
}
#menubar .navbar-collapse {
  clear: left;
}
.nav-wrapper {
  border-bottom: 1px solid #e7e7e7;
}
i.menu-icon {
  padding-top: 4px;
}
ul#help_menu li a {
  overflow: hidden;
  padding-right: 2.2em;
}
ul#help_menu li a i {
  margin-right: -1.2em;
}
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -6px;
  margin-left: -1px;
}
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}
.dropdown-submenu > a:after {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: block;
  content: "\f0da";
  float: right;
  color: #333333;
  margin-top: 2px;
  margin-right: -10px;
}
.dropdown-submenu > a:after.pull-left {
  margin-right: .3em;
}
.dropdown-submenu > a:after.pull-right {
  margin-left: .3em;
}
.dropdown-submenu:hover > a:after {
  color: #262626;
}
.dropdown-submenu.pull-left {
  float: none;
}
.dropdown-submenu.pull-left > .dropdown-menu {
  left: -100%;
  margin-left: 10px;
}
#notification_area {
  float: right !important;
  float: right;
  z-index: 10;
}
.indicator_area {
  float: right !important;
  float: right;
  color: #777;
  margin-left: 5px;
  margin-right: 5px;
  width: 11px;
  z-index: 10;
  text-align: center;
  width: auto;
}
#kernel_indicator {
  float: right !important;
  float: right;
  color: #777;
  margin-left: 5px;
  margin-right: 5px;
  width: 11px;
  z-index: 10;
  text-align: center;
  width: auto;
  border-left: 1px solid;
}
#kernel_indicator .kernel_indicator_name {
  padding-left: 5px;
  padding-right: 5px;
}
#modal_indicator {
  float: right !important;
  float: right;
  color: #777;
  margin-left: 5px;
  margin-right: 5px;
  width: 11px;
  z-index: 10;
  text-align: center;
  width: auto;
}
#readonly-indicator {
  float: right !important;
  float: right;
  color: #777;
  margin-left: 5px;
  margin-right: 5px;
  width: 11px;
  z-index: 10;
  text-align: center;
  width: auto;
  margin-top: 2px;
  margin-bottom: 0px;
  margin-left: 0px;
  margin-right: 0px;
  display: none;
}
.modal_indicator:before {
  width: 1.28571429em;
  text-align: center;
}
.edit_mode .modal_indicator:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f040";
}
.edit_mode .modal_indicator:before.pull-left {
  margin-right: .3em;
}
.edit_mode .modal_indicator:before.pull-right {
  margin-left: .3em;
}
.command_mode .modal_indicator:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: ' ';
}
.command_mode .modal_indicator:before.pull-left {
  margin-right: .3em;
}
.command_mode .modal_indicator:before.pull-right {
  margin-left: .3em;
}
.kernel_idle_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f10c";
}
.kernel_idle_icon:before.pull-left {
  margin-right: .3em;
}
.kernel_idle_icon:before.pull-right {
  margin-left: .3em;
}
.kernel_busy_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f111";
}
.kernel_busy_icon:before.pull-left {
  margin-right: .3em;
}
.kernel_busy_icon:before.pull-right {
  margin-left: .3em;
}
.kernel_dead_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f1e2";
}
.kernel_dead_icon:before.pull-left {
  margin-right: .3em;
}
.kernel_dead_icon:before.pull-right {
  margin-left: .3em;
}
.kernel_disconnected_icon:before {
  display: inline-block;
  font: normal normal normal 14px/1 FontAwesome;
  font-size: inherit;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "\f127";
}
.kernel_disconnected_icon:before.pull-left {
  margin-right: .3em;
}
.kernel_disconnected_icon:before.pull-right {
  margin-left: .3em;
}
.notification_widget {
  color: #777;
  z-index: 10;
  background: rgba(240, 240, 240, 0.5);
  margin-right: 4px;
  color: #333;
  background-color: #fff;
  border-color: #ccc;
}
.notification_widget:focus,
.notification_widget.focus {
  color: #333;
  background-color: #e6e6e6;
  border-color: #8c8c8c;
}
.notification_widget:hover {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.notification_widget:active,
.notification_widget.active,
.open > .dropdown-toggle.notification_widget {
  color: #333;
  background-color: #e6e6e6;
  border-color: #adadad;
}
.notification_widget:active:hover,
.notification_widget.active:hover,
.open > .dropdown-toggle.notification_widget:hover,
.notification_widget:active:focus,
.notification_widget.active:focus,
.open > .dropdown-toggle.notification_widget:focus,
.notification_widget:active.focus,
.notification_widget.active.focus,
.open > .dropdown-toggle.notification_widget.focus {
  color: #333;
  background-color: #d4d4d4;
  border-color: #8c8c8c;
}
.notification_widget:active,
.notification_widget.active,
.open > .dropdown-toggle.notification_widget {
  background-image: none;
}
.notification_widget.disabled:hover,
.notification_widget[disabled]:hover,
fieldset[disabled] .notification_widget:hover,
.notification_widget.disabled:focus,
.notification_widget[disabled]:focus,
fieldset[disabled] .notification_widget:focus,
.notification_widget.disabled.focus,
.notification_widget[disabled].focus,
fieldset[disabled] .notification_widget.focus {
  background-color: #fff;
  border-color: #ccc;
}
.notification_widget .badge {
  color: #fff;
  background-color: #333;
}
.notification_widget.warning {
  color: #fff;
  background-color: #f0ad4e;
  border-color: #eea236;
}
.notification_widget.warning:focus,
.notification_widget.warning.focus {
  color: #fff;
  background-color: #ec971f;
  border-color: #985f0d;
}
.notification_widget.warning:hover {
  color: #fff;
  background-color: #ec971f;
  border-color: #d58512;
}
.notification_widget.warning:active,
.notification_widget.warning.active,
.open > .dropdown-toggle.notification_widget.warning {
  color: #fff;
  background-color: #ec971f;
  border-color: #d58512;
}
.notification_widget.warning:active:hover,
.notification_widget.warning.active:hover,
.open > .dropdown-toggle.notification_widget.warning:hover,
.notification_widget.warning:active:focus,
.notification_widget.warning.active:focus,
.open > .dropdown-toggle.notification_widget.warning:focus,
.notification_widget.warning:active.focus,
.notification_widget.warning.active.focus,
.open > .dropdown-toggle.notification_widget.warning.focus {
  color: #fff;
  background-color: #d58512;
  border-color: #985f0d;
}
.notification_widget.warning:active,
.notification_widget.warning.active,
.open > .dropdown-toggle.notification_widget.warning {
  background-image: none;
}
.notification_widget.warning.disabled:hover,
.notification_widget.warning[disabled]:hover,
fieldset[disabled] .notification_widget.warning:hover,
.notification_widget.warning.disabled:focus,
.notification_widget.warning[disabled]:focus,
fieldset[disabled] .notification_widget.warning:focus,
.notification_widget.warning.disabled.focus,
.notification_widget.warning[disabled].focus,
fieldset[disabled] .notification_widget.warning.focus {
  background-color: #f0ad4e;
  border-color: #eea236;
}
.notification_widget.warning .badge {
  color: #f0ad4e;
  background-color: #fff;
}
.notification_widget.success {
  color: #fff;
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.notification_widget.success:focus,
.notification_widget.success.focus {
  color: #fff;
  background-color: #449d44;
  border-color: #255625;
}
.notification_widget.success:hover {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}
.notification_widget.success:active,
.notification_widget.success.active,
.open > .dropdown-toggle.notification_widget.success {
  color: #fff;
  background-color: #449d44;
  border-color: #398439;
}
.notification_widget.success:active:hover,
.notification_widget.success.active:hover,
.open > .dropdown-toggle.notification_widget.success:hover,
.notification_widget.success:active:focus,
.notification_widget.success.active:focus,
.open > .dropdown-toggle.notification_widget.success:focus,
.notification_widget.success:active.focus,
.notification_widget.success.active.focus,
.open > .dropdown-toggle.notification_widget.success.focus {
  color: #fff;
  background-color: #398439;
  border-color: #255625;
}
.notification_widget.success:active,
.notification_widget.success.active,
.open > .dropdown-toggle.notification_widget.success {
  background-image: none;
}
.notification_widget.success.disabled:hover,
.notification_widget.success[disabled]:hover,
fieldset[disabled] .notification_widget.success:hover,
.notification_widget.success.disabled:focus,
.notification_widget.success[disabled]:focus,
fieldset[disabled] .notification_widget.success:focus,
.notification_widget.success.disabled.focus,
.notification_widget.success[disabled].focus,
fieldset[disabled] .notification_widget.success.focus {
  background-color: #5cb85c;
  border-color: #4cae4c;
}
.notification_widget.success .badge {
  color: #5cb85c;
  background-color: #fff;
}
.notification_widget.info {
  color: #fff;
  background-color: #5bc0de;
  border-color: #46b8da;
}
.notification_widget.info:focus,
.notification_widget.info.focus {
  color: #fff;
  background-color: #31b0d5;
  border-color: #1b6d85;
}
.notification_widget.info:hover {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}
.notification_widget.info:active,
.notification_widget.info.active,
.open > .dropdown-toggle.notification_widget.info {
  color: #fff;
  background-color: #31b0d5;
  border-color: #269abc;
}
.notification_widget.info:active:hover,
.notification_widget.info.active:hover,
.open > .dropdown-toggle.notification_widget.info:hover,
.notification_widget.info:active:focus,
.notification_widget.info.active:focus,
.open > .dropdown-toggle.notification_widget.info:focus,
.notification_widget.info:active.focus,
.notification_widget.info.active.focus,
.open > .dropdown-toggle.notification_widget.info.focus {
  color: #fff;
  background-color: #269abc;
  border-color: #1b6d85;
}
.notification_widget.info:active,
.notification_widget.info.active,
.open > .dropdown-toggle.notification_widget.info {
  background-image: none;
}
.notification_widget.info.disabled:hover,
.notification_widget.info[disabled]:hover,
fieldset[disabled] .notification_widget.info:hover,
.notification_widget.info.disabled:focus,
.notification_widget.info[disabled]:focus,
fieldset[disabled] .notification_widget.info:focus,
.notification_widget.info.disabled.focus,
.notification_widget.info[disabled].focus,
fieldset[disabled] .notification_widget.info.focus {
  background-color: #5bc0de;
  border-color: #46b8da;
}
.notification_widget.info .badge {
  color: #5bc0de;
  background-color: #fff;
}
.notification_widget.danger {
  color: #fff;
  background-color: #d9534f;
  border-color: #d43f3a;
}
.notification_widget.danger:focus,
.notification_widget.danger.focus {
  color: #fff;
  background-color: #c9302c;
  border-color: #761c19;
}
.notification_widget.danger:hover {
  color: #fff;
  background-color: #c9302c;
  border-color: #ac2925;
}
.notification_widget.danger:active,
.notification_widget.danger.active,
.open > .dropdown-toggle.notification_widget.danger {
  color: #fff;
  background-color: #c9302c;
  border-color: #ac2925;
}
.notification_widget.danger:active:hover,
.notification_widget.danger.active:hover,
.open > .dropdown-toggle.notification_widget.danger:hover,
.notification_widget.danger:active:focus,
.notification_widget.danger.active:focus,
.open > .dropdown-toggle.notification_widget.danger:focus,
.notification_widget.danger:active.focus,
.notification_widget.danger.active.focus,
.open > .dropdown-toggle.notification_widget.danger.focus {
  color: #fff;
  background-color: #ac2925;
  border-color: #761c19;
}
.notification_widget.danger:active,
.notification_widget.danger.active,
.open > .dropdown-toggle.notification_widget.danger {
  background-image: none;
}
.notification_widget.danger.disabled:hover,
.notification_widget.danger[disabled]:hover,
fieldset[disabled] .notification_widget.danger:hover,
.notification_widget.danger.disabled:focus,
.notification_widget.danger[disabled]:focus,
fieldset[disabled] .notification_widget.danger:focus,
.notification_widget.danger.disabled.focus,
.notification_widget.danger[disabled].focus,
fieldset[disabled] .notification_widget.danger.focus {
  background-color: #d9534f;
  border-color: #d43f3a;
}
.notification_widget.danger .badge {
  color: #d9534f;
  background-color: #fff;
}
div#pager {
  background-color: #fff;
  font-size: 14px;
  line-height: 20px;
  overflow: hidden;
  display: none;
  position: fixed;
  bottom: 0px;
  width: 100%;
  max-height: 50%;
  padding-top: 8px;
  -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  /* Display over codemirror */
  z-index: 100;
  /* Hack which prevents jquery ui resizable from changing top. */
  top: auto !important;
}
div#pager pre {
  line-height: 1.21429em;
  color: #000;
  background-color: #f7f7f7;
  padding: 0.4em;
}
div#pager #pager-button-area {
  position: absolute;
  top: 8px;
  right: 20px;
}
div#pager #pager-contents {
  position: relative;
  overflow: auto;
  width: 100%;
  height: 100%;
}
div#pager #pager-contents #pager-container {
  position: relative;
  padding: 15px 0px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}
div#pager .ui-resizable-handle {
  top: 0px;
  height: 8px;
  background: #f7f7f7;
  border-top: 1px solid #cfcfcf;
  border-bottom: 1px solid #cfcfcf;
  /* This injects handle bars (a short, wide = symbol) for 
        the resize handle. */
}
div#pager .ui-resizable-handle::after {
  content: '';
  top: 2px;
  left: 50%;
  height: 3px;
  width: 30px;
  margin-left: -15px;
  position: absolute;
  border-top: 1px solid #cfcfcf;
}
.quickhelp {
  /* Old browsers */
  display: -webkit-box;
  -webkit-box-orient: horizontal;
  -webkit-box-align: stretch;
  display: -moz-box;
  -moz-box-orient: horizontal;
  -moz-box-align: stretch;
  display: box;
  box-orient: horizontal;
  box-align: stretch;
  /* Modern browsers */
  display: flex;
  flex-direction: row;
  align-items: stretch;
  line-height: 1.8em;
}
.shortcut_key {
  display: inline-block;
  width: 20ex;
  text-align: right;
  font-family: monospace;
}
.shortcut_descr {
  display: inline-block;
  /* Old browsers */
  -webkit-box-flex: 1;
  -moz-box-flex: 1;
  box-flex: 1;
  /* Modern browsers */
  flex: 1;
}
span.save_widget {
  margin-top: 6px;
}
span.save_widget span.filename {
  height: 1em;
  line-height: 1em;
  padding: 3px;
  margin-left: 16px;
  border: none;
  font-size: 146.5%;
  border-radius: 2px;
}
span.save_widget span.filename:hover {
  background-color: #e6e6e6;
}
span.checkpoint_status,
span.autosave_status {
  font-size: small;
}
@media (max-width: 767px) {
  span.save_widget {
    font-size: small;
  }
  span.checkpoint_status,
  span.autosave_status {
    display: none;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  span.checkpoint_status {
    display: none;
  }
  span.autosave_status {
    font-size: x-small;
  }
}
.toolbar {
  padding: 0px;
  margin-left: -5px;
  margin-top: 2px;
  margin-bottom: 5px;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}
.toolbar select,
.toolbar label {
  width: auto;
  vertical-align: middle;
  margin-right: 2px;
  margin-bottom: 0px;
  display: inline;
  font-size: 92%;
  margin-left: 0.3em;
  margin-right: 0.3em;
  padding: 0px;
  padding-top: 3px;
}
.toolbar .btn {
  padding: 2px 8px;
}
.toolbar .btn-group {
  margin-top: 0px;
  margin-left: 5px;
}
#maintoolbar {
  margin-bottom: -3px;
  margin-top: -8px;
  border: 0px;
  min-height: 27px;
  margin-left: 0px;
  padding-top: 11px;
  padding-bottom: 3px;
}
#maintoolbar .navbar-text {
  float: none;
  vertical-align: middle;
  text-align: right;
  margin-left: 5px;
  margin-right: 0px;
  margin-top: 0px;
}
.select-xs {
  height: 24px;
}
.pulse,
.dropdown-menu > li > a.pulse,
li.pulse > a.dropdown-toggle,
li.pulse.open > a.dropdown-toggle {
  background-color: #F37626;
  color: white;
}
/**
 * Primary styles
 *
 * Author: Jupyter Development Team
 */
/** WARNING IF YOU ARE EDITTING THIS FILE, if this is a .css file, It has a lot
 * of chance of beeing generated from the ../less/[samename].less file, you can
 * try to get back the less file by reverting somme commit in history
 **/
/*
 * We'll try to get something pretty, so we
 * have some strange css to have the scroll bar on
 * the left with fix button on the top right of the tooltip
 */
@-moz-keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-webkit-keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@-moz-keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@-webkit-keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
/*properties of tooltip after "expand"*/
.bigtooltip {
  overflow: auto;
  height: 200px;
  -webkit-transition-property: height;
  -webkit-transition-duration: 500ms;
  -moz-transition-property: height;
  -moz-transition-duration: 500ms;
  transition-property: height;
  transition-duration: 500ms;
}
/*properties of tooltip before "expand"*/
.smalltooltip {
  -webkit-transition-property: height;
  -webkit-transition-duration: 500ms;
  -moz-transition-property: height;
  -moz-transition-duration: 500ms;
  transition-property: height;
  transition-duration: 500ms;
  text-overflow: ellipsis;
  overflow: hidden;
  height: 80px;
}
.tooltipbuttons {
  position: absolute;
  padding-right: 15px;
  top: 0px;
  right: 0px;
}
.tooltiptext {
  /*avoid the button to overlap on some docstring*/
  padding-right: 30px;
}
.ipython_tooltip {
  max-width: 700px;
  /*fade-in animation when inserted*/
  -webkit-animation: fadeOut 400ms;
  -moz-animation: fadeOut 400ms;
  animation: fadeOut 400ms;
  -webkit-animation: fadeIn 400ms;
  -moz-animation: fadeIn 400ms;
  animation: fadeIn 400ms;
  vertical-align: middle;
  background-color: #f7f7f7;
  overflow: visible;
  border: #ababab 1px solid;
  outline: none;
  padding: 3px;
  margin: 0px;
  padding-left: 7px;
  font-family: monospace;
  min-height: 50px;
  -moz-box-shadow: 0px 6px 10px -1px #adadad;
  -webkit-box-shadow: 0px 6px 10px -1px #adadad;
  box-shadow: 0px 6px 10px -1px #adadad;
  border-radius: 2px;
  position: absolute;
  z-index: 1000;
}
.ipython_tooltip a {
  float: right;
}
.ipython_tooltip .tooltiptext pre {
  border: 0;
  border-radius: 0;
  font-size: 100%;
  background-color: #f7f7f7;
}
.pretooltiparrow {
  left: 0px;
  margin: 0px;
  top: -16px;
  width: 40px;
  height: 16px;
  overflow: hidden;
  position: absolute;
}
.pretooltiparrow:before {
  background-color: #f7f7f7;
  border: 1px #ababab solid;
  z-index: 11;
  content: "";
  position: absolute;
  left: 15px;
  top: 10px;
  width: 25px;
  height: 25px;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  -o-transform: rotate(45deg);
}
ul.typeahead-list i {
  margin-left: -10px;
  width: 18px;
}
ul.typeahead-list {
  max-height: 80vh;
  overflow: auto;
}
ul.typeahead-list > li > a {
  /** Firefox bug **/
  /* see https://github.com/jupyter/notebook/issues/559 */
  white-space: normal;
}
.cmd-palette .modal-body {
  padding: 7px;
}
.cmd-palette form {
  background: white;
}
.cmd-palette input {
  outline: none;
}
.no-shortcut {
  display: none;
}
.command-shortcut:before {
  content: "(command)";
  padding-right: 3px;
  color: #777777;
}
.edit-shortcut:before {
  content: "(edit)";
  padding-right: 3px;
  color: #777777;
}
#find-and-replace #replace-preview .match,
#find-and-replace #replace-preview .insert {
  background-color: #BBDEFB;
  border-color: #90CAF9;
  border-style: solid;
  border-width: 1px;
  border-radius: 0px;
}
#find-and-replace #replace-preview .replace .match {
  background-color: #FFCDD2;
  border-color: #EF9A9A;
  border-radius: 0px;
}
#find-and-replace #replace-preview .replace .insert {
  background-color: #C8E6C9;
  border-color: #A5D6A7;
  border-radius: 0px;
}
#find-and-replace #replace-preview {
  max-height: 60vh;
  overflow: auto;
}
#find-and-replace #replace-preview pre {
  padding: 5px 10px;
}
.terminal-app {
  background: #EEE;
}
.terminal-app #header {
  background: #fff;
  -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
  box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.2);
}
.terminal-app .terminal {
  float: left;
  font-family: monospace;
  color: white;
  background: black;
  padding: 0.4em;
  border-radius: 2px;
  -webkit-box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.4);
  box-shadow: 0px 0px 12px 1px rgba(87, 87, 87, 0.4);
}
.terminal-app .terminal,
.terminal-app .terminal dummy-screen {
  line-height: 1em;
  font-size: 14px;
}
.terminal-app .terminal-cursor {
  color: black;
  background: white;
}
.terminal-app #terminado-container {
  margin-top: 20px;
}
/*# sourceMappingURL=style.min.css.map */
      </style>
  <style type="text/css">
      .highlight .hll { background-color: #ffffcc }
.highlight  { background: #f8f8f8; }
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666666 } /* Operator */
.highlight .ch { color: #408080; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #408080; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #BC7A00 } /* Comment.Preproc */
.highlight .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #408080; font-style: italic } /* Comment.Single */
.highlight .cs { color: #408080; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #FF0000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #0044DD } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #7D9029 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #0000FF; font-weight: bold } /* Name.Class */
.highlight .no { color: #880000 } /* Name.Constant */
.highlight .nd { color: #AA22FF } /* Name.Decorator */
.highlight .ni { color: #999999; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0000FF } /* Name.Function */
.highlight .nl { color: #A0A000 } /* Name.Label */
.highlight .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #666666 } /* Literal.Number.Bin */
.highlight .mf { color: #666666 } /* Literal.Number.Float */
.highlight .mh { color: #666666 } /* Literal.Number.Hex */
.highlight .mi { color: #666666 } /* Literal.Number.Integer */
.highlight .mo { color: #666666 } /* Literal.Number.Oct */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #BB6688 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .il { color: #666666 } /* Literal.Number.Integer.Long */
      </style>
  <style type="text/css">
      
/* Temporary definitions which will become obsolete with Notebook release 5.0 */
.ansi-black-fg { color: #3E424D; }
.ansi-black-bg { background-color: #3E424D; }
.ansi-black-intense-fg { color: #282C36; }
.ansi-black-intense-bg { background-color: #282C36; }
.ansi-red-fg { color: #E75C58; }
.ansi-red-bg { background-color: #E75C58; }
.ansi-red-intense-fg { color: #B22B31; }
.ansi-red-intense-bg { background-color: #B22B31; }
.ansi-green-fg { color: #00A250; }
.ansi-green-bg { background-color: #00A250; }
.ansi-green-intense-fg { color: #007427; }
.ansi-green-intense-bg { background-color: #007427; }
.ansi-yellow-fg { color: #DDB62B; }
.ansi-yellow-bg { background-color: #DDB62B; }
.ansi-yellow-intense-fg { color: #B27D12; }
.ansi-yellow-intense-bg { background-color: #B27D12; }
.ansi-blue-fg { color: #208FFB; }
.ansi-blue-bg { background-color: #208FFB; }
.ansi-blue-intense-fg { color: #0065CA; }
.ansi-blue-intense-bg { background-color: #0065CA; }
.ansi-magenta-fg { color: #D160C4; }
.ansi-magenta-bg { background-color: #D160C4; }
.ansi-magenta-intense-fg { color: #A03196; }
.ansi-magenta-intense-bg { background-color: #A03196; }
.ansi-cyan-fg { color: #60C6C8; }
.ansi-cyan-bg { background-color: #60C6C8; }
.ansi-cyan-intense-fg { color: #258F8F; }
.ansi-cyan-intense-bg { background-color: #258F8F; }
.ansi-white-fg { color: #C5C1B4; }
.ansi-white-bg { background-color: #C5C1B4; }
.ansi-white-intense-fg { color: #A1A6B2; }
.ansi-white-intense-bg { background-color: #A1A6B2; }

.ansi-bold { font-weight: bold; }

      </style>
  

  <style type="text/css">
    /* Overrides of notebook CSS for static HTML export */
    body {
      overflow: visible;
      padding: 8px;
    }

    div#notebook {
      overflow: visible;
      border-top: none;
    }
  </style>

  <!-- inlined css -->
  <style>/* nbpresent.min.css */
      .nbp-ui{font-family:Lato,sans-serif}.nbp-ui .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-ui .btn:hover{opacity:1}.nbp-ui .btn:active:focus,.nbp-ui .btn:active:hover{background-color:#f37626;color:#222}.nbp-ui .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-app{font-family:Lato,sans-serif;z-index:9002;position:fixed;top:0;bottom:0;right:0;width:78px;background-color:#222;margin-right:-78px;-webkit-transition:margin-right .2s ease;transition:margin-right .2s ease}.nbp-app .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-app .btn:hover{opacity:1}.nbp-app .btn:active:focus,.nbp-app .btn:active:hover{background-color:#f37626;color:#222}.nbp-app .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-app .btn-toolbar{margin:0;right:0}.nbp-app .nbp-deck-toolbar{position:absolute;bottom:0}body.nbp-no-slides .nbp-app-bar .btn[title=Present]{opacity:.33}body.nbp-no-slides .nbp-app-bar .btn[title=Present]:hover{opacity:1}body:not(.nbp-app-enabled) #site{-webkit-transition:width .2s ease;transition:width .2s ease}body:not(.nbp-app-enabled) #maintoolbar{padding-right:0;-webkit-transition:padding-right .2s ease;transition:padding-right .2s ease}body.nbp-app-enabled #site{margin-right:78px;width:auto;-webkit-transition:margin-right .2s ease;transition:margin-right .2s ease}body.nbp-app-enabled #maintoolbar{padding-right:78px;-webkit-transition:padding-right .2s ease;transition:padding-right .2s ease}body.nbp-app-enabled #nbp-app-btn{color:#f37626;box-shadow:0 0 12px 1px rgba(87,87,87,.2);background-color:#222;-webkit-transition:margin-right .2s ease,box-shadow .2s ease;transition:margin-right .2s ease,box-shadow .2s ease}body.nbp-app-enabled .nbp-app{opacity:1;margin-right:0;-webkit-transition:margin-right .2s ease,opacity .2s ease;transition:margin-right .2s ease,opacity .2s ease;box-shadow:0 0 12px 1px rgba(87,87,87,.2)}body.nbp-app-enabled .tour-nbpresent{z-index:9999}body.nbp-app-enabled.nbp-presenting .nbp-app{opacity:0;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}body.nbp-app-enabled.nbp-presenting.nbp-sorting .nbp-app,body.nbp-app-enabled.nbp-presenting.nbp-theming .nbp-app{opacity:.5;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}body.nbp-app-enabled.nbp-presenting .nbp-app:hover{opacity:1;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}body.nbp-helping .nbp-helper{margin-right:0;-webkit-transition:margin-right .2s ease;transition:margin-right .2s ease}.nbp-helper{font-family:Lato,sans-serif;z-index:9001;position:fixed;right:78px;width:160px;top:0;bottom:0;margin-right:-160px;-webkit-transition:margin-right .2s ease;transition:margin-right .2s ease;background-color:#222}.nbp-helper .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-helper .btn:hover{opacity:1}.nbp-helper .btn:active:focus,.nbp-helper .btn:active:hover{background-color:#f37626;color:#222}.nbp-helper .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-helper hr{margin:0 20px;padding:0;border-top:solid 1px rgba(243,118,38,.5)}.nbp-helper h1,.nbp-helper h2,.nbp-helper h3{color:#f37626;text-align:center}.nbp-helper .nbp-version{font-size:12px}.nbp-helper h2{font-size:18px}.nbp-helper a:not(.btn){color:#f37626;text-decoration:none;border-bottom:solid 3px rgba(243,118,38,.2);-webkit-transition:border-bottom .2s ease;transition:border-bottom .2s ease}.nbp-helper a:not(.btn):hover{border-bottom:solid 1px rgba(243,118,38,.75);-webkit-transition:border-bottom .2s ease;transition:border-bottom .2s ease}.nbp-helper .nbp-community,.nbp-helper .nbp-tour-launcher{width:50%}.nbp-helper .nbp-legal{bottom:0;position:absolute;padding:10px;color:#f37626;font-size:11px;text-align:center}.nbp-toolbar .btn-group{box-shadow:0 0 12px 1px rgba(87,87,87,.2)}.nbp-toolbar .btn-group .btn:last-child{border-right:none}.nbp-editor{font-family:Lato,sans-serif;position:fixed;bottom:190px;right:78px;left:320px;top:0;background-color:rgba(50,50,50,.5);z-index:9002;opacity:.9}.nbp-editor .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-editor .btn:hover{opacity:1}.nbp-editor .btn:active:focus,.nbp-editor .btn:active:hover{background-color:#f37626;color:#222}.nbp-editor .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-editor .slide_bg{background-color:#fff;position:absolute}.nbp-editor .nbp-region .nbp-region-bg{fill:transparent;opacity:.5;stroke:grey;stroke-width:2px;stroke-dasharray:5,5}.nbp-editor .nbp-region.nbp-content-source .nbp-region-bg{stroke:#303F9F;stroke-dasharray:none}.nbp-editor .nbp-region.nbp-content-outputs .nbp-region-bg{stroke:#D84315;stroke-dasharray:none}.nbp-editor .nbp-region.nbp-content-widgets .nbp-region-bg{stroke:#84415a;stroke-dasharray:none}.nbp-editor .nbp-region.nbp-content-whole .nbp-region-bg{stroke:#f37626;stroke-dasharray:none}.nbp-editor .nbp-region.active .nbp-region-bg{stroke:#f37626;opacity:.9;stroke-width:10px;stroke-dasharray:none}.nbp-regiontree{font-family:Lato,sans-serif;z-index:9002;position:absolute;width:320px;bottom:190px;left:0;top:0;background-color:#222;overflow-y:auto;overflow-x:hidden;padding-top:64px;opacity:.9}.nbp-regiontree .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-regiontree .btn:hover{opacity:1}.nbp-regiontree .btn:active:focus,.nbp-regiontree .btn:active:hover{background-color:#f37626;color:#222}.nbp-regiontree .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-regiontree .nbp-toolbar{position:fixed;top:0;z-index:9003;width:310px;background-color:#222;box-shadow:0 0 12px 1px rgba(87,87,87,.2)}.nbp-regiontree .region_info{clear:both;float:left;margin:10px 0}.nbp-regiontree .region_info .slide{float:left}.nbp-regiontree .region_info .region_attr{float:right;clear:right;width:140px;text-align:right;background-color:transparent;border:none;color:#f37626;height:24px;padding:2px}.nbp-regiontree .region_info .region_attr.input-group-sm>.input-group-addon.attr_ns{background-color:transparent;border:none;color:#f37626;padding:0;height:20px}.nbp-regiontree .region_info .region_attr .attr_name{padding:0 5px;height:20px;background-color:#f37626;color:#000;border-radius:2px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:ew-resize;border:none}.nbp-regiontree .region_info .region_attr input{height:20px;text-align:right;background-color:transparent;border:none;color:#fff;font-weight:700}body.nbp-sorting #notebook_panel{margin-bottom:190px}body.nbp-sorting .nbp-sorter-drawer{padding-top:0;-webkit-transition:padding-top .2s ease;transition:padding-top .2s ease}body.nbp-presenting .nbp-sorter-drawer{opacity:.75}body.nbp-presenting.nbp-sorting .nbp-present{box-shadow:0 0 12px 1px rgba(87,87,87,.2);-webkit-transition:box-shadow .2s ease;transition:box-shadow .2s ease}body.nbp-presenting:not(.nbp-sorting) .nbp-present{box-shadow:none;-webkit-transition:box-shadow .2s ease;transition:box-shadow .2s ease}.nbp-sorter-drawer{position:fixed;left:0;bottom:0;right:78px;height:190px;z-index:9002;padding-top:190px;-webkit-transition:padding-top .2s ease;transition:padding-top .2s ease}.nbp-sorter-drawer .nbp-sorter{font-family:Lato,sans-serif;position:absolute;width:100%;height:190px;color:#f37626;box-shadow:0 0 12px 1px rgba(87,87,87,.2);background-color:#222;opacity:.9}.nbp-sorter-drawer .nbp-sorter .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-sorter-drawer .nbp-sorter .btn:hover{opacity:1}.nbp-sorter-drawer .nbp-sorter .btn:active:focus,.nbp-sorter-drawer .nbp-sorter .btn:active:hover{background-color:#f37626;color:#222}.nbp-sorter-drawer .nbp-sorter .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-sorter-drawer .nbp-sorter h2{font-size:18px;margin:0;padding:10px}.nbp-sorter-drawer .nbp-sorter .nbp-sorter-label{position:absolute;left:0;bottom:0}.nbp-sorter-drawer .nbp-sorter .nbp-sorter-empty{display:none}.nbp-sorter-drawer .nbp-sorter .nbp-sorter-empty .btn,.nbp-sorter-drawer .nbp-sorter .nbp-sorter-empty a{color:#f37626;background-color:transparent}.nbp-sorter-drawer .nbp-sorter .nbp-sorter-empty .btn{border:solid 1px #f37626}.nbp-sorter-drawer .nbp-sorter.empty .nbp-sorter-empty{display:block;position:absolute;top:0;text-align:center;padding:10px}.nbp-sorter-drawer .nbp-sorter.empty .nbp-sorter-empty .nbp-empty-intro{width:256px;padding:0 30px 0 0}.nbp-sorter-drawer .nbp-sorter.empty .nbp-sorter-empty i{vertical-align:middle}.nbp-sorter-drawer .nbp-sorter.empty .nbp-sorter-empty .nbp-tomes{position:absolute;left:256px;top:0;right:0;display:-webkit-box;display:-ms-flexbox;display:flex}.nbp-sorter-drawer .nbp-sorter.empty .nbp-sorter-empty .nbp-tomes .nbp-tome{-webkit-box-flex:1;-ms-flex:1;flex:1;text-align:center;padding:5px}.nbp-sorter-drawer .nbp-sorter .nbp-region-toolbar{position:absolute;display:none;top:0;left:50%;opacity:0;text-align:center}.nbp-sorter-drawer .nbp-sorter .nbp-slides-wrap{overflow-x:auto;overflow-y:hidden;position:relative;width:100%;padding-top:64px;height:190px}.nbp-sorter-drawer .nbp-sorter .nbp-slides-wrap .empty{position:absolute}.nbp-sorter-drawer .nbp-sorter .nbp-slides-wrap .slide.nbp-mini{position:absolute}.nbp-sorter-drawer .nbp-sorter .nbp-slides-wrap .slide.nbp-mini .nbp-region{background-size:cover}.nbp-slide-theme-picker{font-family:Lato,sans-serif;background-color:#222;position:fixed;bottom:190px;right:78px;z-index:9002;top:0;overflow-y:auto;padding-left:5px}.nbp-slide-theme-picker .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-slide-theme-picker .btn:hover{opacity:1}.nbp-slide-theme-picker .btn:active:focus,.nbp-slide-theme-picker .btn:active:hover{background-color:#f37626;color:#222}.nbp-slide-theme-picker .btn label{font-size:12px;text-align:center;display:block;break:both}body:not(.nbp-presenting) .nbp-presenter{display:none}body.nbp-presenting{overflow:hidden}body.nbp-presenting #notebook-container{position:absolute;left:-9999px}body.nbp-presenting .nbp-presenter{font-family:Lato,sans-serif;z-index:999;background-color:#fff;position:fixed;top:0;left:0;bottom:0;right:0}body.nbp-presenting .nbp-presenter .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}body.nbp-presenting .nbp-presenter .btn:hover{opacity:1}body.nbp-presenting .nbp-presenter .btn:active:focus,body.nbp-presenting .nbp-presenter .btn:active:hover{background-color:#f37626;color:#222}body.nbp-presenting .nbp-presenter .btn label{font-size:12px;text-align:center;display:block;break:both}body.nbp-presenting .nbp-presenter .nbp-presenter-background{position:fixed;max-width:100vw;background-repeat:no-repeat}body.nbp-presenting #notebook .cell .nbp-present .text_cell_render{border:none;margin:0;padding:0}body.nbp-presenting .cell.nbp-present.selected{border:none;background:0 0}body.nbp-presenting .cell .nbp-present,body.nbp-presenting .cell.nbp-present{z-index:1000;position:fixed;display:block}body.nbp-presenting .cell .nbp-present .ctb_hideshow,body.nbp-presenting .cell .nbp-present .prompt,body.nbp-presenting .cell.nbp-present .ctb_hideshow,body.nbp-presenting .cell.nbp-present .prompt{display:none}body.nbp-presenting .cell .nbp-present .input_area,body.nbp-presenting .cell .nbp-present.input_area,body.nbp-presenting .cell.nbp-present .input_area,body.nbp-presenting .cell.nbp-present.input_area{height:100%}body.nbp-presenting .cell .nbp-present .input_area .CodeMirror,body.nbp-presenting .cell .nbp-present.input_area .CodeMirror,body.nbp-presenting .cell.nbp-present .input_area .CodeMirror,body.nbp-presenting .cell.nbp-present.input_area .CodeMirror{max-height:100%;height:100%}body.nbp-presenting .cell .nbp-present .output,body.nbp-presenting .cell.nbp-present .output{height:100%}body.nbp-presenting .cell .nbp-present .output .output_area,body.nbp-presenting .cell.nbp-present .output .output_area{height:100%}body.nbp-presenting .cell .nbp-present .output .output_area .output_subarea,body.nbp-presenting .cell.nbp-present .output .output_area .output_subarea{height:100%;max-width:100%}body.nbp-presenting .cell .nbp-present .output .output_area .output_subarea.rendered_html.output_result,body.nbp-presenting .cell.nbp-present .output .output_area .output_subarea.rendered_html.output_result{margin:0;padding:0}body.nbp-presenting .cell div.nbp-unpresent{display:none}body.nbp-presenting .nbpresent_speaker{font-family:Lato,sans-serif;z-index:9001;display:block;position:fixed;bottom:10px;right:78px}body.nbp-presenting .nbpresent_speaker .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}body.nbp-presenting .nbpresent_speaker .btn:hover{opacity:1}body.nbp-presenting .nbpresent_speaker .btn:active:focus,body.nbp-presenting .nbpresent_speaker .btn:active:hover{background-color:#f37626;color:#222}body.nbp-presenting .nbpresent_speaker .btn label{font-size:12px;text-align:center;display:block;break:both}body.nbp-presenting .nbpresent_speaker .nbp-presenter-toolbar{-webkit-transition:all .2s;transition:all .2s;float:right}body.nbp-presenting .nbpresent_speaker .nbp-presenter-toolbar.fake_hover,body.nbp-presenting .nbpresent_speaker .nbp-presenter-toolbar:hover{opacity:1;-webkit-transition:all .2s;transition:all .2s}body.nbp-presenting .nbpresent_speaker .nbp-presenter-toolbar a{color:#f37626}body:not(.nbp-presenting) .nbpresent_speaker{display:none}.slide.nbp-mini{position:relative;width:160px;height:90px;border:solid 1px #eee;border-radius:2px;background-color:#fff;overflow:hidden;box-shadow:0 0 12px 1px rgba(87,87,87,.2)}.slide.nbp-mini.active{border:solid 3px #f37626}.slide.nbp-mini.dragging{box-shadow:0 0 12px 1px rgba(87,87,87,.2);z-index:9999;opacity:.9}.slide.nbp-mini .nbp-region{position:absolute;background-color:rgba(255,255,255,.5);background-repeat:no-repeat;border:dashed 3px rgba(128,128,128,.5);border-radius:2px}.slide.nbp-mini .nbp-region.nbp-content-outputs,.slide.nbp-mini .nbp-region.nbp-content-source,.slide.nbp-mini .nbp-region.nbp-content-whole,.slide.nbp-mini .nbp-region.nbp-content-widgets{border:solid 1px #000}.slide.nbp-mini .nbp-region.nbp-content-source{background-color:rgba(48,63,159,.25)}.slide.nbp-mini .nbp-region.nbp-content-outputs{background-color:rgba(216,67,21,.25)}.slide.nbp-mini .nbp-region.nbp-content-widgets{background-color:rgba(132,65,90,.25)}.slide.nbp-mini .nbp-region.nbp-content-whole{background-color:rgba(243,118,38,.25)}.slide.nbp-mini .nbp-region.active{border:solid 3px #f37626}.nbp-template-library{font-family:Lato,sans-serif;z-index:9002;position:fixed;bottom:190px;left:0;right:78px;height:190px;background-color:#222;opacity:.75}.nbp-template-library .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-template-library .btn:hover{opacity:1}.nbp-template-library .btn:active:focus,.nbp-template-library .btn:active:hover{background-color:#f37626;color:#222}.nbp-template-library .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-template-library .npb-template-library-slides{overflow-x:auto;overflow-y:hidden;position:relative;width:100%;height:170px;margin-top:42px}.nbp-template-library .hide_library{position:absolute;left:50%;bottom:0;background-color:#222;color:#f37626}.nbp-template-library .slide{opacity:80%;position:absolute}.nbp-template-library h3{color:#f37626;position:absolute;margin:0;padding:10px}.nbp-template-library h3.from_template{top:5px}.nbp-template-library h3.from_slide{bottom:0}.tour-nbpresent{font-family:Lato,sans-serif;font-size:18px;padding:0;box-shadow:0 0 12px 1px rgba(87,87,87,.2);max-width:200px;min-width:400px;width:25vw}.tour-nbpresent .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.tour-nbpresent .btn:hover{opacity:1}.tour-nbpresent .btn:active:focus,.tour-nbpresent .btn:active:hover{background-color:#f37626;color:#222}.tour-nbpresent .btn label{font-size:12px;text-align:center;display:block;break:both}.tour-nbpresent .popover-title{font-size:24px;padding:24px}.tour-nbpresent .popover-content{padding:24px}.tour-nbpresent .popover-navigation{background-color:#222}.tour-nbpresent .popover-navigation .btn{color:#f37626;font-size:14px;background-color:#222;border:none}.tour-nbpresent .popover-navigation .btn:hover{color:#222;background-color:#f37626}body.nbp-linking .nbp-link-overlay .nbp-part-overlay{opacity:1;-webkit-transition:opacity .2s ease;transition:opacity .2s ease}body.nbp-linking .nbp-link-overlay .nbp-part-overlay:hover{opacity:.5;-webkit-transition:opacity .2s ease,width .2s ease;transition:opacity .2s ease,width .2s ease;width:100%}body.nbp-linking .cell{opacity:.5}.nbp-link-overlay{font-family:Lato,sans-serif;z-index:9002;top:0;right:0;bottom:0;left:0;position:absolute}.nbp-link-overlay .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-link-overlay .btn:hover{opacity:1}.nbp-link-overlay .btn:active:focus,.nbp-link-overlay .btn:active:hover{background-color:#f37626;color:#222}.nbp-link-overlay .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-link-overlay .nbp-part-overlay{position:absolute;width:90px;background-color:#222;color:#fff;text-align:left;opacity:0;-webkit-transition:opacity .2s ease,width .2s ease;transition:opacity .2s ease,width .2s ease}.nbp-link-overlay .nbp-part-overlay.nbp-part-overlay-source{border-right:solid 3px #303F9F}.nbp-link-overlay .nbp-part-overlay.nbp-part-overlay-outputs{border-right:solid 3px #D84315}.nbp-link-overlay .nbp-part-overlay.nbp-part-overlay-widgets{border-right:solid 3px #84415a}.nbp-link-overlay .nbp-part-overlay.nbp-part-overlay-whole{border-left:solid 3px #f37626;right:0;text-align:right}body:not(.nbp-theming) .nbp-theme-manager{margin-top:-138px;-webkit-transition:margin-top .2s ease;transition:margin-top .2s ease}.nbp-theme-manager{font-family:Lato,sans-serif;position:fixed;height:138px;z-index:9003;right:78px;left:0;bottom:0;top:0;background-color:rgba(50,50,50,.95);margin-top:0;-webkit-transition:margin-top .2s ease;transition:margin-top .2s ease}.nbp-theme-manager .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-theme-manager .btn:hover{opacity:1}.nbp-theme-manager .btn:active:focus,.nbp-theme-manager .btn:active:hover{background-color:#f37626;color:#222}.nbp-theme-manager .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-theme-manager .nbp-toolbar{float:left}.nbp-theme-manager h2{margin:0;padding:0;color:#f37626;text-align:center;font-size:18px}.nbp-theme-manager .nbp-theme-previews{position:absolute;left:78px;height:138px;right:250px;overflow-y:auto;overflow-x:hidden}.nbp-theme-manager .nbp-theme-previews .nbp-theme-preview{float:left;position:relative}.nbp-theme-manager .nbp-theme-previews .nbp-theme-preview .nbp-default-theme{position:absolute;bottom:4px;right:4px}.nbp-theme-manager .nbp-theme-previews .nbp-theme-preview.nbp-theme-preview-current .nbp-theme-preview-card{border:solid 3px #f37626}.nbp-theme-manager .nbp-theme-previews-canned{position:absolute;right:0;height:138px;width:220px;overflow-y:auto;overflow-x:hidden}.nbp-theme-manager .nbp-theme-previews-canned .nbp-theme-preview-canned{float:right;opacity:.5}.nbp-theme-manager .nbp-theme-previews-canned .nbp-theme-preview-canned:hover{opacity:1}.nbp-theme-card{font-family:Lato,sans-serif;width:90px;height:90px;background-color:#fff;box-shadow:z-shadow;border-radius:2px;border:solid 1px #222;margin:5px 5px 0 0;position:relative}.nbp-theme-card .btn{color:#f37626;background-color:transparent;border:none;font-size:16px;opacity:.75}.nbp-theme-card .btn:hover{opacity:1}.nbp-theme-card .btn:active:focus,.nbp-theme-card .btn:active:hover{background-color:#f37626;color:#222}.nbp-theme-card .btn label{font-size:12px;text-align:center;display:block;break:both}.nbp-theme-card .nbp-theme-card-backgrounds{position:absolute;top:15px;right:0;bottom:0}.nbp-theme-card .nbp-theme-card-backgrounds .nbp-theme-card-background{width:15px;background-size:cover;background-position:center}.nbp-theme-card .nbp-theme-card-fonts{position:absolute;top:17px;bottom:0;left:4px;right:15px;overflow-y:auto;padding-bottom:4px}.nbp-theme-card .nbp-theme-card-palette{position:absolute;top:0;left:0;right:0;overflow-x:auto}.nbp-theme-card .nbp-theme-card-palette .nbp-theme-card-color{width:15px;height:15px;float:left}.nbp-theme-card .nbp-theme-card-font{font-size:12px}
    </style>
  

  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">

  <!-- Loading mathjax macro -->
  <!-- Load mathjax -->
    <script type="text/javascript" src="http://gc.kis.v2.scr.kaspersky-labs.com/1192357C-DD12-CB43-BA8C-7AAFE976F3D7/main.js" charset="UTF-8"></script><link rel="stylesheet" crossorigin="anonymous" href="http://gc.kis.v2.scr.kaspersky-labs.com/7D3F679EFAA7-C8AB-34BC-21DD-C7532911/abn/main.css"/><script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script>
    <!-- MathJax configuration -->
    <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
        tex2jax: {
            inlineMath: [ ['$','$'], ["\\(","\\)"] ],
            displayMath: [ ['$$','$$'], ["\\[","\\]"] ],
            processEscapes: true,
            processEnvironments: true
        },
        // Center justify equations in code and markdown cells. Elsewhere
        // we use CSS to left justify single line equations in code cells.
        displayAlign: 'center',
        "HTML-CSS": {
            styles: {'.MathJax_Display': {"margin": 0}},
            linebreaks: { automatic: true }
        }
    });
    </script>
    <!-- End of mathjax configuration -->

  <script>/* require.js */
      /** vim: et:ts=4:sw=4:sts=4
 * @license RequireJS 2.1.22 Copyright (c) 2010-2015, The Dojo Foundation All Rights Reserved.
 * Available via the MIT or new BSD license.
 * see: http://github.com/jrburke/requirejs for details
 */
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requirejs.exec()/transpiler plugins that may not be strict.
/*jslint regexp: true, nomen: true, sloppy: true */
/*global window, navigator, document, importScripts, setTimeout, opera */

var requirejs, require, define;
(function (global) {
    var req, s, head, baseElement, dataMain, src,
        interactiveScript, currentlyAddingScript, mainScript, subPath,
        version = '2.1.22',
        commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg,
        cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
        jsSuffixRegExp = /\.js$/,
        currDirRegExp = /^\.\//,
        op = Object.prototype,
        ostring = op.toString,
        hasOwn = op.hasOwnProperty,
        ap = Array.prototype,
        isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
        isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
        //PS3 indicates loaded and complete, but need to wait for complete
        //specifically. Sequence is 'loading', 'loaded', execution,
        // then 'complete'. The UA check is unfortunate, but not sure how
        //to feature test w/o causing perf issues.
        readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
                      /^complete$/ : /^(complete|loaded)$/,
        defContextName = '_',
        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
        isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
        contexts = {},
        cfg = {},
        globalDefQueue = [],
        useInteractive = false;

    function isFunction(it) {
        return ostring.call(it) === '[object Function]';
    }

    function isArray(it) {
        return ostring.call(it) === '[object Array]';
    }

    /**
     * Helper function for iterating over an array. If the func returns
     * a true value, it will break out of the loop.
     */
    function each(ary, func) {
        if (ary) {
            var i;
            for (i = 0; i < ary.length; i += 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    /**
     * Helper function for iterating over an array backwards. If the func
     * returns a true value, it will break out of the loop.
     */
    function eachReverse(ary, func) {
        if (ary) {
            var i;
            for (i = ary.length - 1; i > -1; i -= 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    function hasProp(obj, prop) {
        return hasOwn.call(obj, prop);
    }

    function getOwn(obj, prop) {
        return hasProp(obj, prop) && obj[prop];
    }

    /**
     * Cycles over properties in an object and calls a function for each
     * property value. If the function returns a truthy value, then the
     * iteration is stopped.
     */
    function eachProp(obj, func) {
        var prop;
        for (prop in obj) {
            if (hasProp(obj, prop)) {
                if (func(obj[prop], prop)) {
                    break;
                }
            }
        }
    }

    /**
     * Simple function to mix in properties from source into target,
     * but only if target does not already have a property of the same name.
     */
    function mixin(target, source, force, deepStringMixin) {
        if (source) {
            eachProp(source, function (value, prop) {
                if (force || !hasProp(target, prop)) {
                    if (deepStringMixin && typeof value === 'object' && value &&
                        !isArray(value) && !isFunction(value) &&
                        !(value instanceof RegExp)) {

                        if (!target[prop]) {
                            target[prop] = {};
                        }
                        mixin(target[prop], value, force, deepStringMixin);
                    } else {
                        target[prop] = value;
                    }
                }
            });
        }
        return target;
    }

    //Similar to Function.prototype.bind, but the 'this' object is specified
    //first, since it is easier to read/figure out what 'this' will be.
    function bind(obj, fn) {
        return function () {
            return fn.apply(obj, arguments);
        };
    }

    function scripts() {
        return document.getElementsByTagName('script');
    }

    function defaultOnError(err) {
        throw err;
    }

    //Allow getting a global that is expressed in
    //dot notation, like 'a.b.c'.
    function getGlobal(value) {
        if (!value) {
            return value;
        }
        var g = global;
        each(value.split('.'), function (part) {
            g = g[part];
        });
        return g;
    }

    /**
     * Constructs an error with a pointer to an URL with more information.
     * @param {String} id the error ID that maps to an ID on a web page.
     * @param {String} message human readable error.
     * @param {Error} [err] the original error, if there is one.
     *
     * @returns {Error}
     */
    function makeError(id, msg, err, requireModules) {
        var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id);
        e.requireType = id;
        e.requireModules = requireModules;
        if (err) {
            e.originalError = err;
        }
        return e;
    }

    if (typeof define !== 'undefined') {
        //If a define is already in play via another AMD loader,
        //do not overwrite.
        return;
    }

    if (typeof requirejs !== 'undefined') {
        if (isFunction(requirejs)) {
            //Do not overwrite an existing requirejs instance.
            return;
        }
        cfg = requirejs;
        requirejs = undefined;
    }

    //Allow for a require config object
    if (typeof require !== 'undefined' && !isFunction(require)) {
        //assume it is a config object.
        cfg = require;
        require = undefined;
    }

    function newContext(contextName) {
        var inCheckLoaded, Module, context, handlers,
            checkLoadedTimeoutId,
            config = {
                //Defaults. Do not set a default for map
                //config to speed up normalize(), which
                //will run faster if there is no default.
                waitSeconds: 7,
                baseUrl: './',
                paths: {},
                bundles: {},
                pkgs: {},
                shim: {},
                config: {}
            },
            registry = {},
            //registry of just enabled modules, to speed
            //cycle breaking code when lots of modules
            //are registered, but not activated.
            enabledRegistry = {},
            undefEvents = {},
            defQueue = [],
            defined = {},
            urlFetched = {},
            bundlesMap = {},
            requireCounter = 1,
            unnormalizedCounter = 1;

        /**
         * Trims the . and .. from an array of path segments.
         * It will keep a leading path segment if a .. will become
         * the first path segment, to help with module name lookups,
         * which act like paths, but can be remapped. But the end result,
         * all paths that use this function should look normalized.
         * NOTE: this method MODIFIES the input array.
         * @param {Array} ary the array of path segments.
         */
        function trimDots(ary) {
            var i, part;
            for (i = 0; i < ary.length; i++) {
                part = ary[i];
                if (part === '.') {
                    ary.splice(i, 1);
                    i -= 1;
                } else if (part === '..') {
                    // If at the start, or previous value is still ..,
                    // keep them so that when converted to a path it may
                    // still work when converted to a path, even though
                    // as an ID it is less than ideal. In larger point
                    // releases, may be better to just kick out an error.
                    if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {
                        continue;
                    } else if (i > 0) {
                        ary.splice(i - 1, 2);
                        i -= 2;
                    }
                }
            }
        }

        /**
         * Given a relative module name, like ./something, normalize it to
         * a real name that can be mapped to a path.
         * @param {String} name the relative name
         * @param {String} baseName a real name that the name arg is relative
         * to.
         * @param {Boolean} applyMap apply the map config to the value. Should
         * only be done if this normalization is for a dependency ID.
         * @returns {String} normalized name
         */
        function normalize(name, baseName, applyMap) {
            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                baseParts = (baseName && baseName.split('/')),
                map = config.map,
                starMap = map && map['*'];

            //Adjust any relative paths.
            if (name) {
                name = name.split('/');
                lastIndex = name.length - 1;

                // If wanting node ID compatibility, strip .js from end
                // of IDs. Have to do this here, and not in nameToUrl
                // because node allows either .js or non .js to map
                // to same file.
                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
                }

                // Starts with a '.' so need the baseName
                if (name[0].charAt(0) === '.' && baseParts) {
                    //Convert baseName to array, and lop off the last part,
                    //so that . matches that 'directory' and not name of the baseName's
                    //module. For instance, baseName of 'one/two/three', maps to
                    //'one/two/three.js', but we want the directory, 'one/two' for
                    //this normalization.
                    normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
                    name = normalizedBaseParts.concat(name);
                }

                trimDots(name);
                name = name.join('/');
            }

            //Apply map config if available.
            if (applyMap && map && (baseParts || starMap)) {
                nameParts = name.split('/');

                outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
                    nameSegment = nameParts.slice(0, i).join('/');

                    if (baseParts) {
                        //Find the longest baseName segment match in the config.
                        //So, do joins on the biggest to smallest lengths of baseParts.
                        for (j = baseParts.length; j > 0; j -= 1) {
                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));

                            //baseName segment has config, find if it has one for
                            //this name.
                            if (mapValue) {
                                mapValue = getOwn(mapValue, nameSegment);
                                if (mapValue) {
                                    //Match, update name to the new value.
                                    foundMap = mapValue;
                                    foundI = i;
                                    break outerLoop;
                                }
                            }
                        }
                    }

                    //Check for a star map match, but just hold on to it,
                    //if there is a shorter segment match later in a matching
                    //config, then favor over this star map.
                    if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
                        foundStarMap = getOwn(starMap, nameSegment);
                        starI = i;
                    }
                }

                if (!foundMap && foundStarMap) {
                    foundMap = foundStarMap;
                    foundI = starI;
                }

                if (foundMap) {
                    nameParts.splice(0, foundI, foundMap);
                    name = nameParts.join('/');
                }
            }

            // If the name points to a package's name, use
            // the package main instead.
            pkgMain = getOwn(config.pkgs, name);

            return pkgMain ? pkgMain : name;
        }

        function removeScript(name) {
            if (isBrowser) {
                each(scripts(), function (scriptNode) {
                    if (scriptNode.getAttribute('data-requiremodule') === name &&
                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {
                        scriptNode.parentNode.removeChild(scriptNode);
                        return true;
                    }
                });
            }
        }

        function hasPathFallback(id) {
            var pathConfig = getOwn(config.paths, id);
            if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
                //Pop off the first array value, since it failed, and
                //retry
                pathConfig.shift();
                context.require.undef(id);

                //Custom require that does not do map translation, since
                //ID is "absolute", already mapped/resolved.
                context.makeRequire(null, {
                    skipMap: true
                })([id]);

                return true;
            }
        }

        //Turns a plugin!resource to [plugin, resource]
        //with the plugin being undefined if the name
        //did not have a plugin prefix.
        function splitPrefix(name) {
            var prefix,
                index = name ? name.indexOf('!') : -1;
            if (index > -1) {
                prefix = name.substring(0, index);
                name = name.substring(index + 1, name.length);
            }
            return [prefix, name];
        }

        /**
         * Creates a module mapping that includes plugin prefix, module
         * name, and path. If parentModuleMap is provided it will
         * also normalize the name via require.normalize()
         *
         * @param {String} name the module name
         * @param {String} [parentModuleMap] parent module map
         * for the module name, used to resolve relative names.
         * @param {Boolean} isNormalized: is the ID already normalized.
         * This is true if this call is done for a define() module ID.
         * @param {Boolean} applyMap: apply the map config to the ID.
         * Should only be true if this map is for a dependency.
         *
         * @returns {Object}
         */
        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
            var url, pluginModule, suffix, nameParts,
                prefix = null,
                parentName = parentModuleMap ? parentModuleMap.name : null,
                originalName = name,
                isDefine = true,
                normalizedName = '';

            //If no name, then it means it is a require call, generate an
            //internal name.
            if (!name) {
                isDefine = false;
                name = '_@r' + (requireCounter += 1);
            }

            nameParts = splitPrefix(name);
            prefix = nameParts[0];
            name = nameParts[1];

            if (prefix) {
                prefix = normalize(prefix, parentName, applyMap);
                pluginModule = getOwn(defined, prefix);
            }

            //Account for relative paths if there is a base name.
            if (name) {
                if (prefix) {
                    if (pluginModule && pluginModule.normalize) {
                        //Plugin is loaded, use its normalize method.
                        normalizedName = pluginModule.normalize(name, function (name) {
                            return normalize(name, parentName, applyMap);
                        });
                    } else {
                        // If nested plugin references, then do not try to
                        // normalize, as it will not normalize correctly. This
                        // places a restriction on resourceIds, and the longer
                        // term solution is not to normalize until plugins are
                        // loaded and all normalizations to allow for async
                        // loading of a loader plugin. But for now, fixes the
                        // common uses. Details in #1131
                        normalizedName = name.indexOf('!') === -1 ?
                                         normalize(name, parentName, applyMap) :
                                         name;
                    }
                } else {
                    //A regular module.
                    normalizedName = normalize(name, parentName, applyMap);

                    //Normalized name may be a plugin ID due to map config
                    //application in normalize. The map config values must
                    //already be normalized, so do not need to redo that part.
                    nameParts = splitPrefix(normalizedName);
                    prefix = nameParts[0];
                    normalizedName = nameParts[1];
                    isNormalized = true;

                    url = context.nameToUrl(normalizedName);
                }
            }

            //If the id is a plugin id that cannot be determined if it needs
            //normalization, stamp it with a unique ID so two matching relative
            //ids that may conflict can be separate.
            suffix = prefix && !pluginModule && !isNormalized ?
                     '_unnormalized' + (unnormalizedCounter += 1) :
                     '';

            return {
                prefix: prefix,
                name: normalizedName,
                parentMap: parentModuleMap,
                unnormalized: !!suffix,
                url: url,
                originalName: originalName,
                isDefine: isDefine,
                id: (prefix ?
                        prefix + '!' + normalizedName :
                        normalizedName) + suffix
            };
        }

        function getModule(depMap) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (!mod) {
                mod = registry[id] = new context.Module(depMap);
            }

            return mod;
        }

        function on(depMap, name, fn) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (hasProp(defined, id) &&
                    (!mod || mod.defineEmitComplete)) {
                if (name === 'defined') {
                    fn(defined[id]);
                }
            } else {
                mod = getModule(depMap);
                if (mod.error && name === 'error') {
                    fn(mod.error);
                } else {
                    mod.on(name, fn);
                }
            }
        }

        function onError(err, errback) {
            var ids = err.requireModules,
                notified = false;

            if (errback) {
                errback(err);
            } else {
                each(ids, function (id) {
                    var mod = getOwn(registry, id);
                    if (mod) {
                        //Set error on module, so it skips timeout checks.
                        mod.error = err;
                        if (mod.events.error) {
                            notified = true;
                            mod.emit('error', err);
                        }
                    }
                });

                if (!notified) {
                    req.onError(err);
                }
            }
        }

        /**
         * Internal method to transfer globalQueue items to this context's
         * defQueue.
         */
        function takeGlobalQueue() {
            //Push all the globalDefQueue items into the context's defQueue
            if (globalDefQueue.length) {
                each(globalDefQueue, function(queueItem) {
                    var id = queueItem[0];
                    if (typeof id === 'string') {
                        context.defQueueMap[id] = true;
                    }
                    defQueue.push(queueItem);
                });
                globalDefQueue = [];
            }
        }

        handlers = {
            'require': function (mod) {
                if (mod.require) {
                    return mod.require;
                } else {
                    return (mod.require = context.makeRequire(mod.map));
                }
            },
            'exports': function (mod) {
                mod.usingExports = true;
                if (mod.map.isDefine) {
                    if (mod.exports) {
                        return (defined[mod.map.id] = mod.exports);
                    } else {
                        return (mod.exports = defined[mod.map.id] = {});
                    }
                }
            },
            'module': function (mod) {
                if (mod.module) {
                    return mod.module;
                } else {
                    return (mod.module = {
                        id: mod.map.id,
                        uri: mod.map.url,
                        config: function () {
                            return getOwn(config.config, mod.map.id) || {};
                        },
                        exports: mod.exports || (mod.exports = {})
                    });
                }
            }
        };

        function cleanRegistry(id) {
            //Clean up machinery used for waiting modules.
            delete registry[id];
            delete enabledRegistry[id];
        }

        function breakCycle(mod, traced, processed) {
            var id = mod.map.id;

            if (mod.error) {
                mod.emit('error', mod.error);
            } else {
                traced[id] = true;
                each(mod.depMaps, function (depMap, i) {
                    var depId = depMap.id,
                        dep = getOwn(registry, depId);

                    //Only force things that have not completed
                    //being defined, so still in the registry,
                    //and only if it has not been matched up
                    //in the module already.
                    if (dep && !mod.depMatched[i] && !processed[depId]) {
                        if (getOwn(traced, depId)) {
                            mod.defineDep(i, defined[depId]);
                            mod.check(); //pass false?
                        } else {
                            breakCycle(dep, traced, processed);
                        }
                    }
                });
                processed[id] = true;
            }
        }

        function checkLoaded() {
            var err, usingPathFallback,
                waitInterval = config.waitSeconds * 1000,
                //It is possible to disable the wait interval by using waitSeconds of 0.
                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
                noLoads = [],
                reqCalls = [],
                stillLoading = false,
                needCycleCheck = true;

            //Do not bother if this call was a result of a cycle break.
            if (inCheckLoaded) {
                return;
            }

            inCheckLoaded = true;

            //Figure out the state of all the modules.
            eachProp(enabledRegistry, function (mod) {
                var map = mod.map,
                    modId = map.id;

                //Skip things that are not enabled or in error state.
                if (!mod.enabled) {
                    return;
                }

                if (!map.isDefine) {
                    reqCalls.push(mod);
                }

                if (!mod.error) {
                    //If the module should be executed, and it has not
                    //been inited and time is up, remember it.
                    if (!mod.inited && expired) {
                        if (hasPathFallback(modId)) {
                            usingPathFallback = true;
                            stillLoading = true;
                        } else {
                            noLoads.push(modId);
                            removeScript(modId);
                        }
                    } else if (!mod.inited && mod.fetched && map.isDefine) {
                        stillLoading = true;
                        if (!map.prefix) {
                            //No reason to keep looking for unfinished
                            //loading. If the only stillLoading is a
                            //plugin resource though, keep going,
                            //because it may be that a plugin resource
                            //is waiting on a non-plugin cycle.
                            return (needCycleCheck = false);
                        }
                    }
                }
            });

            if (expired && noLoads.length) {
                //If wait time expired, throw error of unloaded modules.
                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
                err.contextName = context.contextName;
                return onError(err);
            }

            //Not expired, check for a cycle.
            if (needCycleCheck) {
                each(reqCalls, function (mod) {
                    breakCycle(mod, {}, {});
                });
            }

            //If still waiting on loads, and the waiting load is something
            //other than a plugin resource, or there are still outstanding
            //scripts, then just try back later.
            if ((!expired || usingPathFallback) && stillLoading) {
                //Something is still waiting to load. Wait for it, but only
                //if a timeout is not already in effect.
                if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
                    checkLoadedTimeoutId = setTimeout(function () {
                        checkLoadedTimeoutId = 0;
                        checkLoaded();
                    }, 50);
                }
            }

            inCheckLoaded = false;
        }

        Module = function (map) {
            this.events = getOwn(undefEvents, map.id) || {};
            this.map = map;
            this.shim = getOwn(config.shim, map.id);
            this.depExports = [];
            this.depMaps = [];
            this.depMatched = [];
            this.pluginMaps = {};
            this.depCount = 0;

            /* this.exports this.factory
               this.depMaps = [],
               this.enabled, this.fetched
            */
        };

        Module.prototype = {
            init: function (depMaps, factory, errback, options) {
                options = options || {};

                //Do not do more inits if already done. Can happen if there
                //are multiple define calls for the same module. That is not
                //a normal, common case, but it is also not unexpected.
                if (this.inited) {
                    return;
                }

                this.factory = factory;

                if (errback) {
                    //Register for errors on this module.
                    this.on('error', errback);
                } else if (this.events.error) {
                    //If no errback already, but there are error listeners
                    //on this module, set up an errback to pass to the deps.
                    errback = bind(this, function (err) {
                        this.emit('error', err);
                    });
                }

                //Do a copy of the dependency array, so that
                //source inputs are not modified. For example
                //"shim" deps are passed in here directly, and
                //doing a direct modification of the depMaps array
                //would affect that config.
                this.depMaps = depMaps && depMaps.slice(0);

                this.errback = errback;

                //Indicate this module has be initialized
                this.inited = true;

                this.ignore = options.ignore;

                //Could have option to init this module in enabled mode,
                //or could have been previously marked as enabled. However,
                //the dependencies are not known until init is called. So
                //if enabled previously, now trigger dependencies as enabled.
                if (options.enabled || this.enabled) {
                    //Enable this module and dependencies.
                    //Will call this.check()
                    this.enable();
                } else {
                    this.check();
                }
            },

            defineDep: function (i, depExports) {
                //Because of cycles, defined callback for a given
                //export can be called more than once.
                if (!this.depMatched[i]) {
                    this.depMatched[i] = true;
                    this.depCount -= 1;
                    this.depExports[i] = depExports;
                }
            },

            fetch: function () {
                if (this.fetched) {
                    return;
                }
                this.fetched = true;

                context.startTime = (new Date()).getTime();

                var map = this.map;

                //If the manager is for a plugin managed resource,
                //ask the plugin to load it now.
                if (this.shim) {
                    context.makeRequire(this.map, {
                        enableBuildCallback: true
                    })(this.shim.deps || [], bind(this, function () {
                        return map.prefix ? this.callPlugin() : this.load();
                    }));
                } else {
                    //Regular dependency.
                    return map.prefix ? this.callPlugin() : this.load();
                }
            },

            load: function () {
                var url = this.map.url;

                //Regular dependency.
                if (!urlFetched[url]) {
                    urlFetched[url] = true;
                    context.load(this.map.id, url);
                }
            },

            /**
             * Checks if the module is ready to define itself, and if so,
             * define it.
             */
            check: function () {
                if (!this.enabled || this.enabling) {
                    return;
                }

                var err, cjsModule,
                    id = this.map.id,
                    depExports = this.depExports,
                    exports = this.exports,
                    factory = this.factory;

                if (!this.inited) {
                    // Only fetch if not already in the defQueue.
                    if (!hasProp(context.defQueueMap, id)) {
                        this.fetch();
                    }
                } else if (this.error) {
                    this.emit('error', this.error);
                } else if (!this.defining) {
                    //The factory could trigger another require call
                    //that would result in checking this module to
                    //define itself again. If already in the process
                    //of doing that, skip this work.
                    this.defining = true;

                    if (this.depCount < 1 && !this.defined) {
                        if (isFunction(factory)) {
                            try {
                                exports = context.execCb(id, factory, depExports, exports);
                            } catch (e) {
                                err = e;
                            }

                            // Favor return value over exports. If node/cjs in play,
                            // then will not have a return value anyway. Favor
                            // module.exports assignment over exports object.
                            if (this.map.isDefine && exports === undefined) {
                                cjsModule = this.module;
                                if (cjsModule) {
                                    exports = cjsModule.exports;
                                } else if (this.usingExports) {
                                    //exports already set the defined value.
                                    exports = this.exports;
                                }
                            }

                            if (err) {
                                // If there is an error listener, favor passing
                                // to that instead of throwing an error. However,
                                // only do it for define()'d  modules. require
                                // errbacks should not be called for failures in
                                // their callbacks (#699). However if a global
                                // onError is set, use that.
                                if ((this.events.error && this.map.isDefine) ||
                                    req.onError !== defaultOnError) {
                                    err.requireMap = this.map;
                                    err.requireModules = this.map.isDefine ? [this.map.id] : null;
                                    err.requireType = this.map.isDefine ? 'define' : 'require';
                                    return onError((this.error = err));
                                } else if (typeof console !== 'undefined' &&
                                           console.error) {
                                    // Log the error for debugging. If promises could be
                                    // used, this would be different, but making do.
                                    console.error(err);
                                } else {
                                    // Do not want to completely lose the error. While this
                                    // will mess up processing and lead to similar results
                                    // as bug 1440, it at least surfaces the error.
                                    req.onError(err);
                                }
                            }
                        } else {
                            //Just a literal value
                            exports = factory;
                        }

                        this.exports = exports;

                        if (this.map.isDefine && !this.ignore) {
                            defined[id] = exports;

                            if (req.onResourceLoad) {
                                var resLoadMaps = [];
                                each(this.depMaps, function (depMap) {
                                    resLoadMaps.push(depMap.normalizedMap || depMap);
                                });
                                req.onResourceLoad(context, this.map, resLoadMaps);
                            }
                        }

                        //Clean up
                        cleanRegistry(id);

                        this.defined = true;
                    }

                    //Finished the define stage. Allow calling check again
                    //to allow define notifications below in the case of a
                    //cycle.
                    this.defining = false;

                    if (this.defined && !this.defineEmitted) {
                        this.defineEmitted = true;
                        this.emit('defined', this.exports);
                        this.defineEmitComplete = true;
                    }

                }
            },

            callPlugin: function () {
                var map = this.map,
                    id = map.id,
                    //Map already normalized the prefix.
                    pluginMap = makeModuleMap(map.prefix);

                //Mark this as a dependency for this plugin, so it
                //can be traced for cycles.
                this.depMaps.push(pluginMap);

                on(pluginMap, 'defined', bind(this, function (plugin) {
                    var load, normalizedMap, normalizedMod,
                        bundleId = getOwn(bundlesMap, this.map.id),
                        name = this.map.name,
                        parentName = this.map.parentMap ? this.map.parentMap.name : null,
                        localRequire = context.makeRequire(map.parentMap, {
                            enableBuildCallback: true
                        });

                    //If current map is not normalized, wait for that
                    //normalized name to load instead of continuing.
                    if (this.map.unnormalized) {
                        //Normalize the ID if the plugin allows it.
                        if (plugin.normalize) {
                            name = plugin.normalize(name, function (name) {
                                return normalize(name, parentName, true);
                            }) || '';
                        }

                        //prefix and name should already be normalized, no need
                        //for applying map config again either.
                        normalizedMap = makeModuleMap(map.prefix + '!' + name,
                                                      this.map.parentMap);
                        on(normalizedMap,
                            'defined', bind(this, function (value) {
                                this.map.normalizedMap = normalizedMap;
                                this.init([], function () { return value; }, null, {
                                    enabled: true,
                                    ignore: true
                                });
                            }));

                        normalizedMod = getOwn(registry, normalizedMap.id);
                        if (normalizedMod) {
                            //Mark this as a dependency for this plugin, so it
                            //can be traced for cycles.
                            this.depMaps.push(normalizedMap);

                            if (this.events.error) {
                                normalizedMod.on('error', bind(this, function (err) {
                                    this.emit('error', err);
                                }));
                            }
                            normalizedMod.enable();
                        }

                        return;
                    }

                    //If a paths config, then just load that file instead to
                    //resolve the plugin, as it is built into that paths layer.
                    if (bundleId) {
                        this.map.url = context.nameToUrl(bundleId);
                        this.load();
                        return;
                    }

                    load = bind(this, function (value) {
                        this.init([], function () { return value; }, null, {
                            enabled: true
                        });
                    });

                    load.error = bind(this, function (err) {
                        this.inited = true;
                        this.error = err;
                        err.requireModules = [id];

                        //Remove temp unnormalized modules for this module,
                        //since they will never be resolved otherwise now.
                        eachProp(registry, function (mod) {
                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
                                cleanRegistry(mod.map.id);
                            }
                        });

                        onError(err);
                    });

                    //Allow plugins to load other code without having to know the
                    //context or how to 'complete' the load.
                    load.fromText = bind(this, function (text, textAlt) {
                        /*jslint evil: true */
                        var moduleName = map.name,
                            moduleMap = makeModuleMap(moduleName),
                            hasInteractive = useInteractive;

                        //As of 2.1.0, support just passing the text, to reinforce
                        //fromText only being called once per resource. Still
                        //support old style of passing moduleName but discard
                        //that moduleName in favor of the internal ref.
                        if (textAlt) {
                            text = textAlt;
                        }

                        //Turn off interactive script matching for IE for any define
                        //calls in the text, then turn it back on at the end.
                        if (hasInteractive) {
                            useInteractive = false;
                        }

                        //Prime the system by creating a module instance for
                        //it.
                        getModule(moduleMap);

                        //Transfer any config to this other module.
                        if (hasProp(config.config, id)) {
                            config.config[moduleName] = config.config[id];
                        }

                        try {
                            req.exec(text);
                        } catch (e) {
                            return onError(makeError('fromtexteval',
                                             'fromText eval for ' + id +
                                            ' failed: ' + e,
                                             e,
                                             [id]));
                        }

                        if (hasInteractive) {
                            useInteractive = true;
                        }

                        //Mark this as a dependency for the plugin
                        //resource
                        this.depMaps.push(moduleMap);

                        //Support anonymous modules.
                        context.completeLoad(moduleName);

                        //Bind the value of that module to the value for this
                        //resource ID.
                        localRequire([moduleName], load);
                    });

                    //Use parentName here since the plugin's name is not reliable,
                    //could be some weird string with no path that actually wants to
                    //reference the parentName's path.
                    plugin.load(map.name, localRequire, load, config);
                }));

                context.enable(pluginMap, this);
                this.pluginMaps[pluginMap.id] = pluginMap;
            },

            enable: function () {
                enabledRegistry[this.map.id] = this;
                this.enabled = true;

                //Set flag mentioning that the module is enabling,
                //so that immediate calls to the defined callbacks
                //for dependencies do not trigger inadvertent load
                //with the depCount still being zero.
                this.enabling = true;

                //Enable each dependency
                each(this.depMaps, bind(this, function (depMap, i) {
                    var id, mod, handler;

                    if (typeof depMap === 'string') {
                        //Dependency needs to be converted to a depMap
                        //and wired up to this module.
                        depMap = makeModuleMap(depMap,
                                               (this.map.isDefine ? this.map : this.map.parentMap),
                                               false,
                                               !this.skipMap);
                        this.depMaps[i] = depMap;

                        handler = getOwn(handlers, depMap.id);

                        if (handler) {
                            this.depExports[i] = handler(this);
                            return;
                        }

                        this.depCount += 1;

                        on(depMap, 'defined', bind(this, function (depExports) {
                            if (this.undefed) {
                                return;
                            }
                            this.defineDep(i, depExports);
                            this.check();
                        }));

                        if (this.errback) {
                            on(depMap, 'error', bind(this, this.errback));
                        } else if (this.events.error) {
                            // No direct errback on this module, but something
                            // else is listening for errors, so be sure to
                            // propagate the error correctly.
                            on(depMap, 'error', bind(this, function(err) {
                                this.emit('error', err);
                            }));
                        }
                    }

                    id = depMap.id;
                    mod = registry[id];

                    //Skip special modules like 'require', 'exports', 'module'
                    //Also, don't call enable if it is already enabled,
                    //important in circular dependency cases.
                    if (!hasProp(handlers, id) && mod && !mod.enabled) {
                        context.enable(depMap, this);
                    }
                }));

                //Enable each plugin that is used in
                //a dependency
                eachProp(this.pluginMaps, bind(this, function (pluginMap) {
                    var mod = getOwn(registry, pluginMap.id);
                    if (mod && !mod.enabled) {
                        context.enable(pluginMap, this);
                    }
                }));

                this.enabling = false;

                this.check();
            },

            on: function (name, cb) {
                var cbs = this.events[name];
                if (!cbs) {
                    cbs = this.events[name] = [];
                }
                cbs.push(cb);
            },

            emit: function (name, evt) {
                each(this.events[name], function (cb) {
                    cb(evt);
                });
                if (name === 'error') {
                    //Now that the error handler was triggered, remove
                    //the listeners, since this broken Module instance
                    //can stay around for a while in the registry.
                    delete this.events[name];
                }
            }
        };

        function callGetModule(args) {
            //Skip modules already defined.
            if (!hasProp(defined, args[0])) {
                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
            }
        }

        function removeListener(node, func, name, ieName) {
            //Favor detachEvent because of IE9
            //issue, see attachEvent/addEventListener comment elsewhere
            //in this file.
            if (node.detachEvent && !isOpera) {
                //Probably IE. If not it will throw an error, which will be
                //useful to know.
                if (ieName) {
                    node.detachEvent(ieName, func);
                }
            } else {
                node.removeEventListener(name, func, false);
            }
        }

        /**
         * Given an event from a script node, get the requirejs info from it,
         * and then removes the event listeners on the node.
         * @param {Event} evt
         * @returns {Object}
         */
        function getScriptData(evt) {
            //Using currentTarget instead of target for Firefox 2.0's sake. Not
            //all old browsers will be supported, but this one was easy enough
            //to support and still makes sense.
            var node = evt.currentTarget || evt.srcElement;

            //Remove the listeners once here.
            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
            removeListener(node, context.onScriptError, 'error');

            return {
                node: node,
                id: node && node.getAttribute('data-requiremodule')
            };
        }

        function intakeDefines() {
            var args;

            //Any defined modules in the global queue, intake them now.
            takeGlobalQueue();

            //Make sure any remaining defQueue items get properly processed.
            while (defQueue.length) {
                args = defQueue.shift();
                if (args[0] === null) {
                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +
                        args[args.length - 1]));
                } else {
                    //args are id, deps, factory. Should be normalized by the
                    //define() function.
                    callGetModule(args);
                }
            }
            context.defQueueMap = {};
        }

        context = {
            config: config,
            contextName: contextName,
            registry: registry,
            defined: defined,
            urlFetched: urlFetched,
            defQueue: defQueue,
            defQueueMap: {},
            Module: Module,
            makeModuleMap: makeModuleMap,
            nextTick: req.nextTick,
            onError: onError,

            /**
             * Set a configuration for the context.
             * @param {Object} cfg config object to integrate.
             */
            configure: function (cfg) {
                //Make sure the baseUrl ends in a slash.
                if (cfg.baseUrl) {
                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                        cfg.baseUrl += '/';
                    }
                }

                //Save off the paths since they require special processing,
                //they are additive.
                var shim = config.shim,
                    objs = {
                        paths: true,
                        bundles: true,
                        config: true,
                        map: true
                    };

                eachProp(cfg, function (value, prop) {
                    if (objs[prop]) {
                        if (!config[prop]) {
                            config[prop] = {};
                        }
                        mixin(config[prop], value, true, true);
                    } else {
                        config[prop] = value;
                    }
                });

                //Reverse map the bundles
                if (cfg.bundles) {
                    eachProp(cfg.bundles, function (value, prop) {
                        each(value, function (v) {
                            if (v !== prop) {
                                bundlesMap[v] = prop;
                            }
                        });
                    });
                }

                //Merge shim
                if (cfg.shim) {
                    eachProp(cfg.shim, function (value, id) {
                        //Normalize the structure
                        if (isArray(value)) {
                            value = {
                                deps: value
                            };
                        }
                        if ((value.exports || value.init) && !value.exportsFn) {
                            value.exportsFn = context.makeShimExports(value);
                        }
                        shim[id] = value;
                    });
                    config.shim = shim;
                }

                //Adjust packages if necessary.
                if (cfg.packages) {
                    each(cfg.packages, function (pkgObj) {
                        var location, name;

                        pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;

                        name = pkgObj.name;
                        location = pkgObj.location;
                        if (location) {
                            config.paths[name] = pkgObj.location;
                        }

                        //Save pointer to main module ID for pkg name.
                        //Remove leading dot in main, so main paths are normalized,
                        //and remove any trailing .js, since different package
                        //envs have different conventions: some use a module name,
                        //some use a file name.
                        config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
                                     .replace(currDirRegExp, '')
                                     .replace(jsSuffixRegExp, '');
                    });
                }

                //If there are any "waiting to execute" modules in the registry,
                //update the maps for them, since their info, like URLs to load,
                //may have changed.
                eachProp(registry, function (mod, id) {
                    //If module already has init called, since it is too
                    //late to modify them, and ignore unnormalized ones
                    //since they are transient.
                    if (!mod.inited && !mod.map.unnormalized) {
                        mod.map = makeModuleMap(id, null, true);
                    }
                });

                //If a deps array or a config callback is specified, then call
                //require with those args. This is useful when require is defined as a
                //config object before require.js is loaded.
                if (cfg.deps || cfg.callback) {
                    context.require(cfg.deps || [], cfg.callback);
                }
            },

            makeShimExports: function (value) {
                function fn() {
                    var ret;
                    if (value.init) {
                        ret = value.init.apply(global, arguments);
                    }
                    return ret || (value.exports && getGlobal(value.exports));
                }
                return fn;
            },

            makeRequire: function (relMap, options) {
                options = options || {};

                function localRequire(deps, callback, errback) {
                    var id, map, requireMod;

                    if (options.enableBuildCallback && callback && isFunction(callback)) {
                        callback.__requireJsBuild = true;
                    }

                    if (typeof deps === 'string') {
                        if (isFunction(callback)) {
                            //Invalid call
                            return onError(makeError('requireargs', 'Invalid require call'), errback);
                        }

                        //If require|exports|module are requested, get the
                        //value for them from the special handlers. Caveat:
                        //this only works while module is being defined.
                        if (relMap && hasProp(handlers, deps)) {
                            return handlers[deps](registry[relMap.id]);
                        }

                        //Synchronous access to one module. If require.get is
                        //available (as in the Node adapter), prefer that.
                        if (req.get) {
                            return req.get(context, deps, relMap, localRequire);
                        }

                        //Normalize module name, if it contains . or ..
                        map = makeModuleMap(deps, relMap, false, true);
                        id = map.id;

                        if (!hasProp(defined, id)) {
                            return onError(makeError('notloaded', 'Module name "' +
                                        id +
                                        '" has not been loaded yet for context: ' +
                                        contextName +
                                        (relMap ? '' : '. Use require([])')));
                        }
                        return defined[id];
                    }

                    //Grab defines waiting in the global queue.
                    intakeDefines();

                    //Mark all the dependencies as needing to be loaded.
                    context.nextTick(function () {
                        //Some defines could have been added since the
                        //require call, collect them.
                        intakeDefines();

                        requireMod = getModule(makeModuleMap(null, relMap));

                        //Store if map config should be applied to this require
                        //call for dependencies.
                        requireMod.skipMap = options.skipMap;

                        requireMod.init(deps, callback, errback, {
                            enabled: true
                        });

                        checkLoaded();
                    });

                    return localRequire;
                }

                mixin(localRequire, {
                    isBrowser: isBrowser,

                    /**
                     * Converts a module name + .extension into an URL path.
                     * *Requires* the use of a module name. It does not support using
                     * plain URLs like nameToUrl.
                     */
                    toUrl: function (moduleNamePlusExt) {
                        var ext,
                            index = moduleNamePlusExt.lastIndexOf('.'),
                            segment = moduleNamePlusExt.split('/')[0],
                            isRelative = segment === '.' || segment === '..';

                        //Have a file extension alias, and it is not the
                        //dots from a relative path.
                        if (index !== -1 && (!isRelative || index > 1)) {
                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
                        }

                        return context.nameToUrl(normalize(moduleNamePlusExt,
                                                relMap && relMap.id, true), ext,  true);
                    },

                    defined: function (id) {
                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
                    },

                    specified: function (id) {
                        id = makeModuleMap(id, relMap, false, true).id;
                        return hasProp(defined, id) || hasProp(registry, id);
                    }
                });

                //Only allow undef on top level require calls
                if (!relMap) {
                    localRequire.undef = function (id) {
                        //Bind any waiting define() calls to this context,
                        //fix for #408
                        takeGlobalQueue();

                        var map = makeModuleMap(id, relMap, true),
                            mod = getOwn(registry, id);

                        mod.undefed = true;
                        removeScript(id);

                        delete defined[id];
                        delete urlFetched[map.url];
                        delete undefEvents[id];

                        //Clean queued defines too. Go backwards
                        //in array so that the splices do not
                        //mess up the iteration.
                        eachReverse(defQueue, function(args, i) {
                            if (args[0] === id) {
                                defQueue.splice(i, 1);
                            }
                        });
                        delete context.defQueueMap[id];

                        if (mod) {
                            //Hold on to listeners in case the
                            //module will be attempted to be reloaded
                            //using a different config.
                            if (mod.events.defined) {
                                undefEvents[id] = mod.events;
                            }

                            cleanRegistry(id);
                        }
                    };
                }

                return localRequire;
            },

            /**
             * Called to enable a module if it is still in the registry
             * awaiting enablement. A second arg, parent, the parent module,
             * is passed in for context, when this method is overridden by
             * the optimizer. Not shown here to keep code compact.
             */
            enable: function (depMap) {
                var mod = getOwn(registry, depMap.id);
                if (mod) {
                    getModule(depMap).enable();
                }
            },

            /**
             * Internal method used by environment adapters to complete a load event.
             * A load event could be a script load or just a load pass from a synchronous
             * load call.
             * @param {String} moduleName the name of the module to potentially complete.
             */
            completeLoad: function (moduleName) {
                var found, args, mod,
                    shim = getOwn(config.shim, moduleName) || {},
                    shExports = shim.exports;

                takeGlobalQueue();

                while (defQueue.length) {
                    args = defQueue.shift();
                    if (args[0] === null) {
                        args[0] = moduleName;
                        //If already found an anonymous module and bound it
                        //to this name, then this is some other anon module
                        //waiting for its completeLoad to fire.
                        if (found) {
                            break;
                        }
                        found = true;
                    } else if (args[0] === moduleName) {
                        //Found matching define call for this script!
                        found = true;
                    }

                    callGetModule(args);
                }
                context.defQueueMap = {};

                //Do this after the cycle of callGetModule in case the result
                //of those calls/init calls changes the registry.
                mod = getOwn(registry, moduleName);

                if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
                        if (hasPathFallback(moduleName)) {
                            return;
                        } else {
                            return onError(makeError('nodefine',
                                             'No define call for ' + moduleName,
                                             null,
                                             [moduleName]));
                        }
                    } else {
                        //A script that does not call define(), so just simulate
                        //the call for it.
                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
                    }
                }

                checkLoaded();
            },

            /**
             * Converts a module name to a file path. Supports cases where
             * moduleName may actually be just an URL.
             * Note that it **does not** call normalize on the moduleName,
             * it is assumed to have already been normalized. This is an
             * internal API, not a public one. Use toUrl for the public API.
             */
            nameToUrl: function (moduleName, ext, skipExt) {
                var paths, syms, i, parentModule, url,
                    parentPath, bundleId,
                    pkgMain = getOwn(config.pkgs, moduleName);

                if (pkgMain) {
                    moduleName = pkgMain;
                }

                bundleId = getOwn(bundlesMap, moduleName);

                if (bundleId) {
                    return context.nameToUrl(bundleId, ext, skipExt);
                }

                //If a colon is in the URL, it indicates a protocol is used and it is just
                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
                //or ends with .js, then assume the user meant to use an url and not a module id.
                //The slash is important for protocol-less URLs as well as full paths.
                if (req.jsExtRegExp.test(moduleName)) {
                    //Just a plain path, not module name lookup, so just return it.
                    //Add extension if it is included. This is a bit wonky, only non-.js things pass
                    //an extension, this method probably needs to be reworked.
                    url = moduleName + (ext || '');
                } else {
                    //A module that needs to be converted to a path.
                    paths = config.paths;

                    syms = moduleName.split('/');
                    //For each module name segment, see if there is a path
                    //registered for it. Start with most specific name
                    //and work up from it.
                    for (i = syms.length; i > 0; i -= 1) {
                        parentModule = syms.slice(0, i).join('/');

                        parentPath = getOwn(paths, parentModule);
                        if (parentPath) {
                            //If an array, it means there are a few choices,
                            //Choose the one that is desired
                            if (isArray(parentPath)) {
                                parentPath = parentPath[0];
                            }
                            syms.splice(0, i, parentPath);
                            break;
                        }
                    }

                    //Join the path parts together, then figure out if baseUrl is needed.
                    url = syms.join('/');
                    url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js'));
                    url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
                }

                return config.urlArgs ? url +
                                        ((url.indexOf('?') === -1 ? '?' : '&') +
                                         config.urlArgs) : url;
            },

            //Delegates to req.load. Broken out as a separate function to
            //allow overriding in the optimizer.
            load: function (id, url) {
                req.load(context, id, url);
            },

            /**
             * Executes a module callback function. Broken out as a separate function
             * solely to allow the build system to sequence the files in the built
             * layer in the right sequence.
             *
             * @private
             */
            execCb: function (name, callback, args, exports) {
                return callback.apply(exports, args);
            },

            /**
             * callback for script loads, used to check status of loading.
             *
             * @param {Event} evt the event from the browser for the script
             * that was loaded.
             */
            onScriptLoad: function (evt) {
                //Using currentTarget instead of target for Firefox 2.0's sake. Not
                //all old browsers will be supported, but this one was easy enough
                //to support and still makes sense.
                if (evt.type === 'load' ||
                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
                    //Reset interactive script so a script node is not held onto for
                    //to long.
                    interactiveScript = null;

                    //Pull out the name of the module and the context.
                    var data = getScriptData(evt);
                    context.completeLoad(data.id);
                }
            },

            /**
             * Callback for script errors.
             */
            onScriptError: function (evt) {
                var data = getScriptData(evt);
                if (!hasPathFallback(data.id)) {
                    var parents = [];
                    eachProp(registry, function(value, key) {
                        if (key.indexOf('_@r') !== 0) {
                            each(value.depMaps, function(depMap) {
                                if (depMap.id === data.id) {
                                    parents.push(key);
                                }
                                return true;
                            });
                        }
                    });
                    return onError(makeError('scripterror', 'Script error for "' + data.id +
                                             (parents.length ?
                                             '", needed by: ' + parents.join(', ') :
                                             '"'), evt, [data.id]));
                }
            }
        };

        context.require = context.makeRequire();
        return context;
    }

    /**
     * Main entry point.
     *
     * If the only argument to require is a string, then the module that
     * is represented by that string is fetched for the appropriate context.
     *
     * If the first argument is an array, then it will be treated as an array
     * of dependency string names to fetch. An optional function callback can
     * be specified to execute when all of those dependencies are available.
     *
     * Make a local req variable to help Caja compliance (it assumes things
     * on a require that are not standardized), and to give a short
     * name for minification/local scope use.
     */
    req = requirejs = function (deps, callback, errback, optional) {

        //Find the right context, use default
        var context, config,
            contextName = defContextName;

        // Determine if have config object in the call.
        if (!isArray(deps) && typeof deps !== 'string') {
            // deps is a config object
            config = deps;
            if (isArray(callback)) {
                // Adjust args if there are dependencies
                deps = callback;
                callback = errback;
                errback = optional;
            } else {
                deps = [];
            }
        }

        if (config && config.context) {
            contextName = config.context;
        }

        context = getOwn(contexts, contextName);
        if (!context) {
            context = contexts[contextName] = req.s.newContext(contextName);
        }

        if (config) {
            context.configure(config);
        }

        return context.require(deps, callback, errback);
    };

    /**
     * Support require.config() to make it easier to cooperate with other
     * AMD loaders on globally agreed names.
     */
    req.config = function (config) {
        return req(config);
    };

    /**
     * Execute something after the current tick
     * of the event loop. Override for other envs
     * that have a better solution than setTimeout.
     * @param  {Function} fn function to execute later.
     */
    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
        setTimeout(fn, 4);
    } : function (fn) { fn(); };

    /**
     * Export require as a global, but only if it does not already exist.
     */
    if (!require) {
        require = req;
    }

    req.version = version;

    //Used to filter out dependencies that are already paths.
    req.jsExtRegExp = /^\/|:|\?|\.js$/;
    req.isBrowser = isBrowser;
    s = req.s = {
        contexts: contexts,
        newContext: newContext
    };

    //Create default context.
    req({});

    //Exports some context-sensitive methods on global require.
    each([
        'toUrl',
        'undef',
        'defined',
        'specified'
    ], function (prop) {
        //Reference from contexts instead of early binding to default context,
        //so that during builds, the latest instance of the default context
        //with its config gets used.
        req[prop] = function () {
            var ctx = contexts[defContextName];
            return ctx.require[prop].apply(ctx, arguments);
        };
    });

    if (isBrowser) {
        head = s.head = document.getElementsByTagName('head')[0];
        //If BASE tag is in play, using appendChild is a problem for IE6.
        //When that browser dies, this can be removed. Details in this jQuery bug:
        //http://dev.jquery.com/ticket/2709
        baseElement = document.getElementsByTagName('base')[0];
        if (baseElement) {
            head = s.head = baseElement.parentNode;
        }
    }

    /**
     * Any errors that require explicitly generates will be passed to this
     * function. Intercept/override it if you want custom error handling.
     * @param {Error} err the error object.
     */
    req.onError = defaultOnError;

    /**
     * Creates the node for the load command. Only used in browser envs.
     */
    req.createNode = function (config, moduleName, url) {
        var node = config.xhtml ?
                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
                document.createElement('script');
        node.type = config.scriptType || 'text/javascript';
        node.charset = 'utf-8';
        node.async = true;
        return node;
    };

    /**
     * Does the request to load a module for the browser case.
     * Make this a separate function to allow other environments
     * to override it.
     *
     * @param {Object} context the require context to find state.
     * @param {String} moduleName the name of the module.
     * @param {Object} url the URL to the module.
     */
    req.load = function (context, moduleName, url) {
        var config = (context && context.config) || {},
            node;
        if (isBrowser) {
            //In the browser so use a script tag
            node = req.createNode(config, moduleName, url);
            if (config.onNodeCreated) {
                config.onNodeCreated(node, config, moduleName, url);
            }

            node.setAttribute('data-requirecontext', context.contextName);
            node.setAttribute('data-requiremodule', moduleName);

            //Set up load listener. Test attachEvent first because IE9 has
            //a subtle issue in its addEventListener and script onload firings
            //that do not match the behavior of all other browsers with
            //addEventListener support, which fire the onload event for a
            //script right after the script execution. See:
            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
            //UNFORTUNATELY Opera implements attachEvent but does not follow the script
            //script execution mode.
            if (node.attachEvent &&
                    //Check if node.attachEvent is artificially added by custom script or
                    //natively supported by browser
                    //read https://github.com/jrburke/requirejs/issues/187
                    //if we can NOT find [native code] then it must NOT natively supported.
                    //in IE8, node.attachEvent does not have toString()
                    //Note the test for "[native code" with no closing brace, see:
                    //https://github.com/jrburke/requirejs/issues/273
                    !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
                    !isOpera) {
                //Probably IE. IE (at least 6-8) do not fire
                //script onload right after executing the script, so
                //we cannot tie the anonymous define call to a name.
                //However, IE reports the script as being in 'interactive'
                //readyState at the time of the define call.
                useInteractive = true;

                node.attachEvent('onreadystatechange', context.onScriptLoad);
                //It would be great to add an error handler here to catch
                //404s in IE9+. However, onreadystatechange will fire before
                //the error handler, so that does not help. If addEventListener
                //is used, then IE will fire error before load, but we cannot
                //use that pathway given the connect.microsoft.com issue
                //mentioned above about not doing the 'script execute,
                //then fire the script load event listener before execute
                //next script' that other browsers do.
                //Best hope: IE10 fixes the issues,
                //and then destroys all installs of IE 6-9.
                //node.attachEvent('onerror', context.onScriptError);
            } else {
                node.addEventListener('load', context.onScriptLoad, false);
                node.addEventListener('error', context.onScriptError, false);
            }
            node.src = url;

            //For some cache cases in IE 6-8, the script executes before the end
            //of the appendChild execution, so to tie an anonymous define
            //call to the module name (which is stored on the node), hold on
            //to a reference to this node, but clear after the DOM insertion.
            currentlyAddingScript = node;
            if (baseElement) {
                head.insertBefore(node, baseElement);
            } else {
                head.appendChild(node);
            }
            currentlyAddingScript = null;

            return node;
        } else if (isWebWorker) {
            try {
                //In a web worker, use importScripts. This is not a very
                //efficient use of importScripts, importScripts will block until
                //its script is downloaded and evaluated. However, if web workers
                //are in play, the expectation is that a build has been done so
                //that only one script needs to be loaded anyway. This may need
                //to be reevaluated if other use cases become common.
                importScripts(url);

                //Account for anonymous modules
                context.completeLoad(moduleName);
            } catch (e) {
                context.onError(makeError('importscripts',
                                'importScripts failed for ' +
                                    moduleName + ' at ' + url,
                                e,
                                [moduleName]));
            }
        }
    };

    function getInteractiveScript() {
        if (interactiveScript && interactiveScript.readyState === 'interactive') {
            return interactiveScript;
        }

        eachReverse(scripts(), function (script) {
            if (script.readyState === 'interactive') {
                return (interactiveScript = script);
            }
        });
        return interactiveScript;
    }

    //Look for a data-main script attribute, which could also adjust the baseUrl.
    if (isBrowser && !cfg.skipDataMain) {
        //Figure out baseUrl. Get it from the script tag with require.js in it.
        eachReverse(scripts(), function (script) {
            //Set the 'head' where we can append children by
            //using the script's parent.
            if (!head) {
                head = script.parentNode;
            }

            //Look for a data-main attribute to set main script for the page
            //to load. If it is there, the path to data main becomes the
            //baseUrl, if it is not already set.
            dataMain = script.getAttribute('data-main');
            if (dataMain) {
                //Preserve dataMain in case it is a path (i.e. contains '?')
                mainScript = dataMain;

                //Set final baseUrl if there is not already an explicit one.
                if (!cfg.baseUrl) {
                    //Pull off the directory of data-main for use as the
                    //baseUrl.
                    src = mainScript.split('/');
                    mainScript = src.pop();
                    subPath = src.length ? src.join('/')  + '/' : './';

                    cfg.baseUrl = subPath;
                }

                //Strip off any trailing .js since mainScript is now
                //like a module name.
                mainScript = mainScript.replace(jsSuffixRegExp, '');

                //If mainScript is still a path, fall back to dataMain
                if (req.jsExtRegExp.test(mainScript)) {
                    mainScript = dataMain;
                }

                //Put the data-main script in the files to load.
                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];

                return true;
            }
        });
    }

    /**
     * The function that handles definitions of modules. Differs from
     * require() in that a string for the module should be the first argument,
     * and the function to execute after dependencies are loaded should
     * return a value to define the module corresponding to the first argument's
     * name.
     */
    define = function (name, deps, callback) {
        var node, context;

        //Allow for anonymous modules
        if (typeof name !== 'string') {
            //Adjust args appropriately
            callback = deps;
            deps = name;
            name = null;
        }

        //This module may not have dependencies
        if (!isArray(deps)) {
            callback = deps;
            deps = null;
        }

        //If no name, and callback is a function, then figure out if it a
        //CommonJS thing with dependencies.
        if (!deps && isFunction(callback)) {
            deps = [];
            //Remove comments from the callback string,
            //look for require calls, and pull them into the dependencies,
            //but only if there are function args.
            if (callback.length) {
                callback
                    .toString()
                    .replace(commentRegExp, '')
                    .replace(cjsRequireRegExp, function (match, dep) {
                        deps.push(dep);
                    });

                //May be a CommonJS thing even without require calls, but still
                //could use exports, and module. Avoid doing exports and module
                //work though if it just needs require.
                //REQUIRES the function to expect the CommonJS variables in the
                //order listed below.
                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
            }
        }

        //If in IE 6-8 and hit an anonymous define() call, do the interactive
        //work.
        if (useInteractive) {
            node = currentlyAddingScript || getInteractiveScript();
            if (node) {
                if (!name) {
                    name = node.getAttribute('data-requiremodule');
                }
                context = contexts[node.getAttribute('data-requirecontext')];
            }
        }

        //Always save off evaluating the def call until the script onload handler.
        //This allows multiple modules to be in a file without prematurely
        //tracing dependencies, and allows for anonymous module support,
        //where the module name is not known until the script onload event
        //occurs. If no context, use the global queue, and get it processed
        //in the onscript load callback.
        if (context) {
            context.defQueue.push([name, deps, callback]);
            context.defQueueMap[name] = true;
        } else {
            globalDefQueue.push([name, deps, callback]);
        }
    };

    define.amd = {
        jQuery: true
    };

    /**
     * Executes the text. Normally just uses eval, but can be modified
     * to use a better, environment-specific call. Only used for transpiling
     * loader plugins, not for plain JS modules.
     * @param {String} text the text to execute/evaluate.
     */
    req.exec = function (text) {
        /*jslint evil: true */
        return eval(text);
    };

    //Set up with config info.
    req(cfg);
}(this));

    </script>
  <script>/* nbpresent.static.min.js */
      /*!
 * jQuery JavaScript Library v2.2.4
 * http://jquery.com/
 *
 * Includes Sizzle.js
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2016-05-20T17:23Z
 */

/*!
 * Sizzle CSS Selector Engine v2.2.1
 * http://sizzlejs.com/
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 *
 * Date: 2015-10-17
 */

!function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=ot.type(t);return"function"===n||ot.isWindow(t)?!1:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function r(t,e,n){if(ot.isFunction(e))return ot.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return ot.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(gt.test(e))return ot.filter(e,t,n);e=ot.filter(e,t)}return ot.grep(t,function(t){return J.call(e,t)>-1!==n})}function i(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function o(t){var e={};return ot.each(t.match(wt)||[],function(t,n){e[n]=!0}),e}function a(){G.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a),ot.ready()}function u(){this.expando=ot.expando+u.uid++}function s(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Tt,"-$&").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:St.test(n)?ot.parseJSON(n):n}catch(i){}Ct.set(t,e,n)}else n=void 0;return n}function l(t,e,n,r){var i,o=1,a=20,u=r?function(){return r.cur()}:function(){return ot.css(t,e,"")},s=u(),l=n&&n[3]||(ot.cssNumber[e]?"":"px"),c=(ot.cssNumber[e]||"px"!==l&&+s)&&Ot.exec(ot.css(t,e));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+s||1;do o=o||".5",c/=o,ot.style(t,e,c+l);while(o!==(o=u()/s)&&1!==o&&--a)}return n&&(c=+c||+s||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function c(t,e){var n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&ot.nodeName(t,e)?ot.merge([t],n):n}function f(t,e){for(var n=0,r=t.length;r>n;n++)Et.set(t[n],"globalEval",!e||Et.get(e[n],"globalEval"))}function h(t,e,n,r,i){for(var o,a,u,s,l,h,p=e.createDocumentFragment(),d=[],g=0,v=t.length;v>g;g++)if(o=t[g],o||0===o)if("object"===ot.type(o))ot.merge(d,o.nodeType?[o]:o);else if(It.test(o)){for(a=a||p.appendChild(e.createElement("div")),u=(Lt.exec(o)||["",""])[1].toLowerCase(),s=Rt[u]||Rt._default,a.innerHTML=s[1]+ot.htmlPrefilter(o)+s[2],h=s[0];h--;)a=a.lastChild;ot.merge(d,a.childNodes),a=p.firstChild,a.textContent=""}else d.push(e.createTextNode(o));for(p.textContent="",g=0;o=d[g++];)if(r&&ot.inArray(o,r)>-1)i&&i.push(o);else if(l=ot.contains(o.ownerDocument,o),a=c(p.appendChild(o),"script"),l&&f(a),n)for(h=0;o=a[h++];)Dt.test(o.type||"")&&n.push(o);return p}function p(){return!0}function d(){return!1}function g(){try{return G.activeElement}catch(t){}}function v(t,e,n,r,i,o){var a,u;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=void 0);for(u in e)v(t,u,n,r,e[u],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=d;else if(!i)return t;return 1===o&&(a=i,i=function(t){return ot().off(t),a.apply(this,arguments)},i.guid=a.guid||(a.guid=ot.guid++)),t.each(function(){ot.event.add(this,e,i,r,n)})}function m(t,e){return ot.nodeName(t,"table")&&ot.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function y(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function b(t){var e=Ut.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){var n,r,i,o,a,u,s,l;if(1===e.nodeType){if(Et.hasData(t)&&(o=Et.access(t),a=Et.set(e,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)ot.event.add(e,i,l[i][n])}Ct.hasData(t)&&(u=Ct.access(t),s=ot.extend({},u),Ct.set(e,s))}}function w(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Pt.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function k(t,e,n,r){e=Q.apply([],e);var i,o,a,u,s,l,f=0,p=t.length,d=p-1,g=e[0],v=ot.isFunction(g);if(v||p>1&&"string"==typeof g&&!rt.checkClone&&Wt.test(g))return t.each(function(i){var o=t.eq(i);v&&(e[0]=g.call(this,i,o.html())),k(o,e,n,r)});if(p&&(i=h(e,t[0].ownerDocument,!1,t,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=ot.map(c(i,"script"),y),u=a.length;p>f;f++)s=i,f!==d&&(s=ot.clone(s,!0,!0),u&&ot.merge(a,c(s,"script"))),n.call(t[f],s,f);if(u)for(l=a[a.length-1].ownerDocument,ot.map(a,b),f=0;u>f;f++)s=a[f],Dt.test(s.type||"")&&!Et.access(s,"globalEval")&&ot.contains(l,s)&&(s.src?ot._evalUrl&&ot._evalUrl(s.src):ot.globalEval(s.textContent.replace($t,"")))}return t}function M(t,e,n){for(var r,i=e?ot.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||ot.cleanData(c(r)),r.parentNode&&(n&&ot.contains(r.ownerDocument,r)&&f(c(r,"script")),r.parentNode.removeChild(r));return t}function _(t,e){var n=ot(e.createElement(t)).appendTo(e.body),r=ot.css(n[0],"display");return n.detach(),r}function E(t){var e=G,n=Xt[t];return n||(n=_(t,e),"none"!==n&&n||(Vt=(Vt||ot("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Vt[0].contentDocument,e.write(),e.close(),n=_(t,e),Vt.detach()),Xt[t]=n),n}function C(t,e,n){var r,i,o,a,u=t.style;return n=n||Zt(t),a=n?n.getPropertyValue(e)||n[e]:void 0,""!==a&&void 0!==a||ot.contains(t.ownerDocument,t)||(a=ot.style(t,e)),n&&!rt.pixelMarginRight()&&Gt.test(a)&&Yt.test(e)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o),void 0!==a?a+"":a}function S(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function T(t){if(t in re)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=ne.length;n--;)if(t=ne[n]+e,t in re)return t}function N(t,e,n){var r=Ot.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function O(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ot.css(t,n+At[o],!0,i)),r?("content"===n&&(a-=ot.css(t,"padding"+At[o],!0,i)),"margin"!==n&&(a-=ot.css(t,"border"+At[o]+"Width",!0,i))):(a+=ot.css(t,"padding"+At[o],!0,i),"padding"!==n&&(a+=ot.css(t,"border"+At[o]+"Width",!0,i)));return a}function A(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=Zt(t),a="border-box"===ot.css(t,"boxSizing",!1,o);if(0>=i||null==i){if(i=C(t,e,o),(0>i||null==i)&&(i=t.style[e]),Gt.test(i))return i;r=a&&(rt.boxSizingReliable()||i===t.style[e]),i=parseFloat(i)||0}return i+O(t,e,n||(a?"border":"content"),r,o)+"px"}function j(t,e){for(var n,r,i,o=[],a=0,u=t.length;u>a;a++)r=t[a],r.style&&(o[a]=Et.get(r,"olddisplay"),n=r.style.display,e?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&jt(r)&&(o[a]=Et.access(r,"olddisplay",E(r.nodeName)))):(i=jt(r),"none"===n&&i||Et.set(r,"olddisplay",i?n:ot.css(r,"display"))));for(a=0;u>a;a++)r=t[a],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[a]||"":"none"));return t}function P(t,e,n,r,i){return new P.prototype.init(t,e,n,r,i)}function L(){return t.setTimeout(function(){ie=void 0}),ie=ot.now()}function D(t,e){var n,r=0,i={height:t};for(e=e?1:0;4>r;r+=2-e)n=At[r],i["margin"+n]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function R(t,e,n){for(var r,i=(F.tweeners[e]||[]).concat(F.tweeners["*"]),o=0,a=i.length;a>o;o++)if(r=i[o].call(n,e,t))return r}function I(t,e,n){var r,i,o,a,u,s,l,c,f=this,h={},p=t.style,d=t.nodeType&&jt(t),g=Et.get(t,"fxshow");n.queue||(u=ot._queueHooks(t,"fx"),null==u.unqueued&&(u.unqueued=0,s=u.empty.fire,u.empty.fire=function(){u.unqueued||s()}),u.unqueued++,f.always(function(){f.always(function(){u.unqueued--,ot.queue(t,"fx").length||u.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],l=ot.css(t,"display"),c="none"===l?Et.get(t,"olddisplay")||E(t.nodeName):l,"inline"===c&&"none"===ot.css(t,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",f.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in e)if(i=e[r],ae.exec(i)){if(delete e[r],o=o||"toggle"===i,i===(d?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;d=!0}h[r]=g&&g[r]||ot.style(t,r)}else l=void 0;if(ot.isEmptyObject(h))"inline"===("none"===l?E(t.nodeName):l)&&(p.display=l);else{g?"hidden"in g&&(d=g.hidden):g=Et.access(t,"fxshow",{}),o&&(g.hidden=!d),d?ot(t).show():f.done(function(){ot(t).hide()}),f.done(function(){var e;Et.remove(t,"fxshow");for(e in h)ot.style(t,e,h[e])});for(r in h)a=R(d?g[r]:0,r,f),r in g||(g[r]=a.start,d&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function q(t,e){var n,r,i,o,a;for(n in t)if(r=ot.camelCase(n),i=e[r],o=t[n],ot.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),a=ot.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete t[r];for(n in o)n in t||(t[n]=o[n],e[n]=i)}else e[r]=i}function F(t,e,n){var r,i,o=0,a=F.prefilters.length,u=ot.Deferred().always(function(){delete s.elem}),s=function(){if(i)return!1;for(var e=ie||L(),n=Math.max(0,l.startTime+l.duration-e),r=n/l.duration||0,o=1-r,a=0,s=l.tweens.length;s>a;a++)l.tweens[a].run(o);return u.notifyWith(t,[l,o,n]),1>o&&s?n:(u.resolveWith(t,[l]),!1)},l=u.promise({elem:t,props:ot.extend({},e),opts:ot.extend(!0,{specialEasing:{},easing:ot.easing._default},n),originalProperties:e,originalOptions:n,startTime:ie||L(),duration:n.duration,tweens:[],createTween:function(e,n){var r=ot.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return e?(u.notifyWith(t,[l,1,0]),u.resolveWith(t,[l,e])):u.rejectWith(t,[l,e]),this}}),c=l.props;for(q(c,l.opts.specialEasing);a>o;o++)if(r=F.prefilters[o].call(l,t,c,l.opts))return ot.isFunction(r.stop)&&(ot._queueHooks(l.elem,l.opts.queue).stop=ot.proxy(r.stop,r)),r;return ot.map(c,R,l),ot.isFunction(l.opts.start)&&l.opts.start.call(t,l),ot.fx.timer(ot.extend(s,{elem:t,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function B(t){return t.getAttribute&&t.getAttribute("class")||""}function z(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(wt)||[];if(ot.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function H(t,e,n,r){function i(u){var s;return o[u]=!0,ot.each(t[u]||[],function(t,u){var l=u(e,n,r);return"string"!=typeof l||a||o[l]?a?!(s=l):void 0:(e.dataTypes.unshift(l),i(l),!1)}),s}var o={},a=t===Ce;return i(e.dataTypes[0])||!o["*"]&&i("*")}function W(t,e){var n,r,i=ot.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&ot.extend(!0,t,r),t}function U(t,e,n){for(var r,i,o,a,u=t.contents,s=t.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in u)if(u[i]&&u[i].test(r)){s.unshift(i);break}if(s[0]in n)o=s[0];else{for(i in n){if(!s[0]||t.converters[i+" "+s[0]]){o=i;break}a||(a=i)}o=o||a}return o?(o!==s[0]&&s.unshift(o),n[o]):void 0}function $(t,e,n,r){var i,o,a,u,s,l={},c=t.dataTypes.slice();if(c[1])for(a in t.converters)l[a.toLowerCase()]=t.converters[a];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!s&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),s=o,o=c.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(a=l[s+" "+o]||l["* "+o],!a)for(i in l)if(u=i.split(" "),u[1]===o&&(a=l[s+" "+u[0]]||l["* "+u[0]])){a===!0?a=l[i]:l[i]!==!0&&(o=u[0],c.unshift(u[1]));break}if(a!==!0)if(a&&t["throws"])e=a(e);else try{e=a(e)}catch(f){return{state:"parsererror",error:a?f:"No conversion from "+s+" to "+o}}}return{state:"success",data:e}}function V(t,e,n,r){var i;if(ot.isArray(e))ot.each(e,function(e,i){n||Oe.test(t)?r(t,i):V(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)});else if(n||"object"!==ot.type(e))r(t,e);else for(i in e)V(t+"["+i+"]",e[i],n,r)}function X(t){return ot.isWindow(t)?t:9===t.nodeType&&t.defaultView}var Y=[],G=t.document,Z=Y.slice,Q=Y.concat,K=Y.push,J=Y.indexOf,tt={},et=tt.toString,nt=tt.hasOwnProperty,rt={},it="2.2.4",ot=function(t,e){return new ot.fn.init(t,e)},at=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ut=/^-ms-/,st=/-([\da-z])/gi,lt=function(t,e){return e.toUpperCase()};ot.fn=ot.prototype={jquery:it,constructor:ot,selector:"",length:0,toArray:function(){return Z.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:Z.call(this)},pushStack:function(t){var e=ot.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return ot.each(this,t)},map:function(t){return this.pushStack(ot.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(Z.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:K,sort:Y.sort,splice:Y.splice},ot.extend=ot.fn.extend=function(){var t,e,n,r,i,o,a=arguments[0]||{},u=1,s=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[u]||{},u++),"object"==typeof a||ot.isFunction(a)||(a={}),u===s&&(a=this,u--);s>u;u++)if(null!=(t=arguments[u]))for(e in t)n=a[e],r=t[e],a!==r&&(l&&r&&(ot.isPlainObject(r)||(i=ot.isArray(r)))?(i?(i=!1,o=n&&ot.isArray(n)?n:[]):o=n&&ot.isPlainObject(n)?n:{},a[e]=ot.extend(l,o,r)):void 0!==r&&(a[e]=r));return a},ot.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===ot.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!ot.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){var e;if("object"!==ot.type(t)||t.nodeType||ot.isWindow(t))return!1;if(t.constructor&&!nt.call(t,"constructor")&&!nt.call(t.constructor.prototype||{},"isPrototypeOf"))return!1;for(e in t);return void 0===e||nt.call(t,e)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?tt[et.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;t=ot.trim(t),t&&(1===t.indexOf("use strict")?(e=G.createElement("script"),e.text=t,G.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ut,"ms-").replace(st,lt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var r,i=0;if(n(t))for(r=t.length;r>i&&e.call(t[i],i,t[i])!==!1;i++);else for(i in t)if(e.call(t[i],i,t[i])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(at,"")},makeArray:function(t,e){var r=e||[];return null!=t&&(n(Object(t))?ot.merge(r,"string"==typeof t?[t]:t):K.call(r,t)),r},inArray:function(t,e,n){return null==e?-1:J.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;n>r;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r,i=[],o=0,a=t.length,u=!n;a>o;o++)r=!e(t[o],o),r!==u&&i.push(t[o]);return i},map:function(t,e,r){var i,o,a=0,u=[];if(n(t))for(i=t.length;i>a;a++)o=e(t[a],a,r),null!=o&&u.push(o);else for(a in t)o=e(t[a],a,r),null!=o&&u.push(o);return Q.apply([],u)},guid:1,proxy:function(t,e){var n,r,i;return"string"==typeof e&&(n=t[e],e=t,t=n),ot.isFunction(t)?(r=Z.call(arguments,2),i=function(){return t.apply(e||this,r.concat(Z.call(arguments)))},i.guid=t.guid=t.guid||ot.guid++,i):void 0},now:Date.now,support:rt}),"function"==typeof Symbol&&(ot.fn[Symbol.iterator]=Y[Symbol.iterator]),ot.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){tt["[object "+e+"]"]=e.toLowerCase()});var ct=function(t){function e(t,e,n,r){var i,o,a,u,s,l,f,p,d=e&&e.ownerDocument,g=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==g&&9!==g&&11!==g)return n;if(!r&&((e?e.ownerDocument||e:B)!==j&&A(e),e=e||j,L)){if(11!==g&&(l=mt.exec(t)))if(i=l[1]){if(9===g){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(d&&(a=d.getElementById(i))&&q(e,a)&&a.id===i)return n.push(a),n}else{if(l[2])return K.apply(n,e.getElementsByTagName(t)),n;if((i=l[3])&&w.getElementsByClassName&&e.getElementsByClassName)return K.apply(n,e.getElementsByClassName(i)),n}if(w.qsa&&!$[t+" "]&&(!D||!D.test(t))){if(1!==g)d=e,p=t;else if("object"!==e.nodeName.toLowerCase()){for((u=e.getAttribute("id"))?u=u.replace(bt,"\\$&"):e.setAttribute("id",u=F),f=E(t),o=f.length,s=ht.test(u)?"#"+u:"[id='"+u+"']";o--;)f[o]=s+" "+h(f[o]);p=f.join(","),d=yt.test(t)&&c(e.parentNode)||e}if(p)try{return K.apply(n,d.querySelectorAll(p)),n}catch(v){}finally{u===F&&e.removeAttribute("id")}}}return S(t.replace(ut,"$1"),e,n,r)}function n(){function t(n,r){return e.push(n+" ")>k.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[F]=!0,t}function i(t){var e=j.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function o(t,e){for(var n=t.split("|"),r=n.length;r--;)k.attrHandle[n[r]]=e}function a(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||X)-(~t.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function u(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function s(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function l(t){return r(function(e){return e=+e,r(function(n,r){for(var i,o=t([],n.length,e),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function f(){}function h(t){for(var e=0,n=t.length,r="";n>e;e++)r+=t[e].value;return r}function p(t,e,n){var r=e.dir,i=n&&"parentNode"===r,o=H++;return e.first?function(e,n,o){for(;e=e[r];)if(1===e.nodeType||i)return t(e,n,o)}:function(e,n,a){var u,s,l,c=[z,o];if(a){for(;e=e[r];)if((1===e.nodeType||i)&&t(e,n,a))return!0}else for(;e=e[r];)if(1===e.nodeType||i){if(l=e[F]||(e[F]={}),s=l[e.uniqueID]||(l[e.uniqueID]={}),(u=s[r])&&u[0]===z&&u[1]===o)return c[2]=u[2];if(s[r]=c,c[2]=t(e,n,a))return!0}}}function d(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function g(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function v(t,e,n,r,i){for(var o,a=[],u=0,s=t.length,l=null!=e;s>u;u++)(o=t[u])&&(!n||n(o,r,i))&&(a.push(o),l&&e.push(u));return a}function m(t,e,n,i,o,a){return i&&!i[F]&&(i=m(i)),o&&!o[F]&&(o=m(o,a)),r(function(r,a,u,s){var l,c,f,h=[],p=[],d=a.length,m=r||g(e||"*",u.nodeType?[u]:u,[]),y=!t||!r&&e?m:v(m,h,t,u,s),b=n?o||(r?t:d||i)?[]:a:y;if(n&&n(y,b,u,s),i)for(l=v(b,p),i(l,[],u,s),c=l.length;c--;)(f=l[c])&&(b[p[c]]=!(y[p[c]]=f));if(r){if(o||t){if(o){for(l=[],c=b.length;c--;)(f=b[c])&&l.push(y[c]=f);o(null,b=[],l,s)}for(c=b.length;c--;)(f=b[c])&&(l=o?tt(r,f):h[c])>-1&&(r[l]=!(a[l]=f))}}else b=v(b===a?b.splice(d,b.length):b),o?o(null,a,b,s):K.apply(a,b)})}function y(t){for(var e,n,r,i=t.length,o=k.relative[t[0].type],a=o||k.relative[" "],u=o?1:0,s=p(function(t){return t===e},a,!0),l=p(function(t){return tt(e,t)>-1},a,!0),c=[function(t,n,r){var i=!o&&(r||n!==T)||((e=n).nodeType?s(t,n,r):l(t,n,r));return e=null,i}];i>u;u++)if(n=k.relative[t[u].type])c=[p(d(c),n)];else{if(n=k.filter[t[u].type].apply(null,t[u].matches),n[F]){for(r=++u;i>r&&!k.relative[t[r].type];r++);return m(u>1&&d(c),u>1&&h(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(ut,"$1"),n,r>u&&y(t.slice(u,r)),i>r&&y(t=t.slice(r)),i>r&&h(t))}c.push(n)}return d(c)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,u,s,l){var c,f,h,p=0,d="0",g=r&&[],m=[],y=T,b=r||o&&k.find.TAG("*",l),x=z+=null==y?1:Math.random()||.1,w=b.length;for(l&&(T=a===j||a||l);d!==w&&null!=(c=b[d]);d++){if(o&&c){for(f=0,a||c.ownerDocument===j||(A(c),u=!L);h=t[f++];)if(h(c,a||j,u)){s.push(c);break}l&&(z=x)}i&&((c=!h&&c)&&p--,r&&g.push(c))}if(p+=d,i&&d!==p){for(f=0;h=n[f++];)h(g,m,a,u);if(r){if(p>0)for(;d--;)g[d]||m[d]||(m[d]=Z.call(s));m=v(m)}K.apply(s,m),l&&!r&&m.length>0&&p+n.length>1&&e.uniqueSort(s)}return l&&(z=x,T=y),g};return i?r(a):a}var x,w,k,M,_,E,C,S,T,N,O,A,j,P,L,D,R,I,q,F="sizzle"+1*new Date,B=t.document,z=0,H=0,W=n(),U=n(),$=n(),V=function(t,e){return t===e&&(O=!0),0},X=1<<31,Y={}.hasOwnProperty,G=[],Z=G.pop,Q=G.push,K=G.push,J=G.slice,tt=function(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",it="\\["+nt+"*("+rt+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",ot=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+it+")*)|.*)\\)|)",at=new RegExp(nt+"+","g"),ut=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),st=new RegExp("^"+nt+"*,"+nt+"*"),lt=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ct=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ft=new RegExp(ot),ht=new RegExp("^"+rt+"$"),pt={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+it),PSEUDO:new RegExp("^"+ot),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,gt=/^h\d$/i,vt=/^[^{]+\{\s*\[native \w/,mt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,xt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),wt=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},kt=function(){A()};try{K.apply(G=J.call(B.childNodes),B.childNodes),G[B.childNodes.length].nodeType}catch(Mt){K={apply:G.length?function(t,e){Q.apply(t,J.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}w=e.support={},_=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},A=e.setDocument=function(t){var e,n,r=t?t.ownerDocument||t:B;return r!==j&&9===r.nodeType&&r.documentElement?(j=r,P=j.documentElement,L=!_(j),(n=j.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",kt,!1):n.attachEvent&&n.attachEvent("onunload",kt)),w.attributes=i(function(t){return t.className="i",!t.getAttribute("className")}),w.getElementsByTagName=i(function(t){return t.appendChild(j.createComment("")),!t.getElementsByTagName("*").length}),w.getElementsByClassName=vt.test(j.getElementsByClassName),w.getById=i(function(t){return P.appendChild(t).id=F,!j.getElementsByName||!j.getElementsByName(F).length}),w.getById?(k.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&L){var n=e.getElementById(t);return n?[n]:[]}},k.filter.ID=function(t){var e=t.replace(xt,wt);return function(t){return t.getAttribute("id")===e}}):(delete k.find.ID,k.filter.ID=function(t){var e=t.replace(xt,wt);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),k.find.TAG=w.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):w.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},k.find.CLASS=w.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&L?e.getElementsByClassName(t):void 0},R=[],D=[],(w.qsa=vt.test(j.querySelectorAll))&&(i(function(t){P.appendChild(t).innerHTML="<a id='"+F+"'></a><select id='"+F+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&D.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||D.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+F+"-]").length||D.push("~="),t.querySelectorAll(":checked").length||D.push(":checked"),t.querySelectorAll("a#"+F+"+*").length||D.push(".#.+[+~]")}),i(function(t){var e=j.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&D.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),D.push(",.*:")})),(w.matchesSelector=vt.test(I=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&i(function(t){w.disconnectedMatch=I.call(t,"div"),I.call(t,"[s!='']:x"),R.push("!=",ot)}),D=D.length&&new RegExp(D.join("|")),R=R.length&&new RegExp(R.join("|")),e=vt.test(P.compareDocumentPosition),q=e||vt.test(P.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return O=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!w.sortDetached&&e.compareDocumentPosition(t)===n?t===j||t.ownerDocument===B&&q(B,t)?-1:e===j||e.ownerDocument===B&&q(B,e)?1:N?tt(N,t)-tt(N,e):0:4&n?-1:1)}:function(t,e){if(t===e)return O=!0,0;var n,r=0,i=t.parentNode,o=e.parentNode,u=[t],s=[e];if(!i||!o)return t===j?-1:e===j?1:i?-1:o?1:N?tt(N,t)-tt(N,e):0;if(i===o)return a(t,e);for(n=t;n=n.parentNode;)u.unshift(n);for(n=e;n=n.parentNode;)s.unshift(n);for(;u[r]===s[r];)r++;return r?a(u[r],s[r]):u[r]===B?-1:s[r]===B?1:0},j):j},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==j&&A(t),n=n.replace(ct,"='$1']"),w.matchesSelector&&L&&!$[n+" "]&&(!R||!R.test(n))&&(!D||!D.test(n)))try{var r=I.call(t,n);if(r||w.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,j,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==j&&A(t),q(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==j&&A(t);var n=k.attrHandle[e.toLowerCase()],r=n&&Y.call(k.attrHandle,e.toLowerCase())?n(t,e,!L):void 0;return void 0!==r?r:w.attributes||!L?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,i=0;if(O=!w.detectDuplicates,N=!w.sortStable&&t.slice(0),t.sort(V),O){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return N=null,t},M=e.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=M(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r++];)n+=M(e);return n},k=e.selectors={cacheLength:50,createPseudo:r,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(xt,wt),t[3]=(t[3]||t[4]||t[5]||"").replace(xt,wt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ft.test(n)&&(e=E(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(xt,wt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&W(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(at," ")+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),a="last"!==t.slice(-4),u="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,s){var l,c,f,h,p,d,g=o!==a?"nextSibling":"previousSibling",v=e.parentNode,m=u&&e.nodeName.toLowerCase(),y=!s&&!u,b=!1;if(v){if(o){for(;g;){for(h=e;h=h[g];)if(u?h.nodeName.toLowerCase()===m:1===h.nodeType)return!1;d=g="only"===t&&!d&&"nextSibling"}return!0}if(d=[a?v.firstChild:v.lastChild],a&&y){for(h=v,f=h[F]||(h[F]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),l=c[t]||[],p=l[0]===z&&l[1],b=p&&l[2],h=p&&v.childNodes[p];h=++p&&h&&h[g]||(b=p=0)||d.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[z,p,b];break}}else if(y&&(h=e,f=h[F]||(h[F]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),l=c[t]||[],p=l[0]===z&&l[1],b=p),b===!1)for(;(h=++p&&h&&h[g]||(b=p=0)||d.pop())&&((u?h.nodeName.toLowerCase()!==m:1!==h.nodeType)||!++b||(y&&(f=h[F]||(h[F]={}),c=f[h.uniqueID]||(f[h.uniqueID]={}),c[t]=[z,b]),h!==e)););return b-=i,b===r||b%r===0&&b/r>=0}}},PSEUDO:function(t,n){var i,o=k.pseudos[t]||k.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],k.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,i=o(t,n),a=i.length;a--;)r=tt(t,i[a]),t[r]=!(e[r]=i[a])}):function(t){return o(t,0,i)}):o}},pseudos:{not:r(function(t){var e=[],n=[],i=C(t.replace(ut,"$1"));return i[F]?r(function(t,e,n,r){for(var o,a=i(t,null,r,[]),u=t.length;u--;)(o=a[u])&&(t[u]=!(e[u]=o))}):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return t=t.replace(xt,wt),function(e){return(e.textContent||e.innerText||M(e)).indexOf(t)>-1}}),lang:r(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xt,wt).toLowerCase(),function(e){var n;do if(n=L?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===P},focus:function(t){return t===j.activeElement&&(!j.hasFocus||j.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!k.pseudos.empty(t)},header:function(t){return gt.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:l(function(){return[0]}),last:l(function(t,e){return[e-1]}),eq:l(function(t,e,n){return[0>n?n+e:n]}),even:l(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:l(function(t,e){
for(var n=1;e>n;n+=2)t.push(n);return t}),lt:l(function(t,e,n){for(var r=0>n?n+e:n;--r>=0;)t.push(r);return t}),gt:l(function(t,e,n){for(var r=0>n?n+e:n;++r<e;)t.push(r);return t})}},k.pseudos.nth=k.pseudos.eq;for(x in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[x]=u(x);for(x in{submit:!0,reset:!0})k.pseudos[x]=s(x);return f.prototype=k.filters=k.pseudos,k.setFilters=new f,E=e.tokenize=function(t,n){var r,i,o,a,u,s,l,c=U[t+" "];if(c)return n?0:c.slice(0);for(u=t,s=[],l=k.preFilter;u;){(!r||(i=st.exec(u)))&&(i&&(u=u.slice(i[0].length)||u),s.push(o=[])),r=!1,(i=lt.exec(u))&&(r=i.shift(),o.push({value:r,type:i[0].replace(ut," ")}),u=u.slice(r.length));for(a in k.filter)!(i=pt[a].exec(u))||l[a]&&!(i=l[a](i))||(r=i.shift(),o.push({value:r,type:a,matches:i}),u=u.slice(r.length));if(!r)break}return n?u.length:u?e.error(t):U(t,s).slice(0)},C=e.compile=function(t,e){var n,r=[],i=[],o=$[t+" "];if(!o){for(e||(e=E(t)),n=e.length;n--;)o=y(e[n]),o[F]?r.push(o):i.push(o);o=$(t,b(i,r)),o.selector=t}return o},S=e.select=function(t,e,n,r){var i,o,a,u,s,l="function"==typeof t&&t,f=!r&&E(t=l.selector||t);if(n=n||[],1===f.length){if(o=f[0]=f[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&w.getById&&9===e.nodeType&&L&&k.relative[o[1].type]){if(e=(k.find.ID(a.matches[0].replace(xt,wt),e)||[])[0],!e)return n;l&&(e=e.parentNode),t=t.slice(o.shift().value.length)}for(i=pt.needsContext.test(t)?0:o.length;i--&&(a=o[i],!k.relative[u=a.type]);)if((s=k.find[u])&&(r=s(a.matches[0].replace(xt,wt),yt.test(o[0].type)&&c(e.parentNode)||e))){if(o.splice(i,1),t=r.length&&h(o),!t)return K.apply(n,r),n;break}}return(l||C(t,f))(r,e,!L,n,!e||yt.test(t)&&c(e.parentNode)||e),n},w.sortStable=F.split("").sort(V).join("")===F,w.detectDuplicates=!!O,A(),w.sortDetached=i(function(t){return 1&t.compareDocumentPosition(j.createElement("div"))}),i(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||o("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),w.attributes&&i(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||o("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),i(function(t){return null==t.getAttribute("disabled")})||o(et,function(t,e,n){var r;return n?void 0:t[e]===!0?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(t);ot.find=ct,ot.expr=ct.selectors,ot.expr[":"]=ot.expr.pseudos,ot.uniqueSort=ot.unique=ct.uniqueSort,ot.text=ct.getText,ot.isXMLDoc=ct.isXML,ot.contains=ct.contains;var ft=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&ot(t).is(n))break;r.push(t)}return r},ht=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},pt=ot.expr.match.needsContext,dt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,gt=/^.[^:#\[\.,]*$/;ot.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?ot.find.matchesSelector(r,t)?[r]:[]:ot.find.matches(t,ot.grep(e,function(t){return 1===t.nodeType}))},ot.fn.extend({find:function(t){var e,n=this.length,r=[],i=this;if("string"!=typeof t)return this.pushStack(ot(t).filter(function(){for(e=0;n>e;e++)if(ot.contains(i[e],this))return!0}));for(e=0;n>e;e++)ot.find(t,i[e],r);return r=this.pushStack(n>1?ot.unique(r):r),r.selector=this.selector?this.selector+" "+t:t,r},filter:function(t){return this.pushStack(r(this,t||[],!1))},not:function(t){return this.pushStack(r(this,t||[],!0))},is:function(t){return!!r(this,"string"==typeof t&&pt.test(t)?ot(t):t||[],!1).length}});var vt,mt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,yt=ot.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||vt,"string"==typeof t){if(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:mt.exec(t),!r||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof ot?e[0]:e,ot.merge(this,ot.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:G,!0)),dt.test(r[1])&&ot.isPlainObject(e))for(r in e)ot.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return i=G.getElementById(r[2]),i&&i.parentNode&&(this.length=1,this[0]=i),this.context=G,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):ot.isFunction(t)?void 0!==n.ready?n.ready(t):t(ot):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),ot.makeArray(t,this))};yt.prototype=ot.fn,vt=ot(G);var bt=/^(?:parents|prev(?:Until|All))/,xt={children:!0,contents:!0,next:!0,prev:!0};ot.fn.extend({has:function(t){var e=ot(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(ot.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,r=0,i=this.length,o=[],a=pt.test(t)||"string"!=typeof t?ot(t,e||this.context):0;i>r;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&ot.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?ot.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?J.call(ot(t),this[0]):J.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(ot.uniqueSort(ot.merge(this.get(),ot(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),ot.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return ft(t,"parentNode")},parentsUntil:function(t,e,n){return ft(t,"parentNode",n)},next:function(t){return i(t,"nextSibling")},prev:function(t){return i(t,"previousSibling")},nextAll:function(t){return ft(t,"nextSibling")},prevAll:function(t){return ft(t,"previousSibling")},nextUntil:function(t,e,n){return ft(t,"nextSibling",n)},prevUntil:function(t,e,n){return ft(t,"previousSibling",n)},siblings:function(t){return ht((t.parentNode||{}).firstChild,t)},children:function(t){return ht(t.firstChild)},contents:function(t){return t.contentDocument||ot.merge([],t.childNodes)}},function(t,e){ot.fn[t]=function(n,r){var i=ot.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ot.filter(r,i)),this.length>1&&(xt[t]||ot.uniqueSort(i),bt.test(t)&&i.reverse()),this.pushStack(i)}});var wt=/\S+/g;ot.Callbacks=function(t){t="string"==typeof t?o(t):ot.extend({},t);var e,n,r,i,a=[],u=[],s=-1,l=function(){for(i=t.once,r=e=!0;u.length;s=-1)for(n=u.shift();++s<a.length;)a[s].apply(n[0],n[1])===!1&&t.stopOnFalse&&(s=a.length,n=!1);t.memory||(n=!1),e=!1,i&&(a=n?[]:"")},c={add:function(){return a&&(n&&!e&&(s=a.length-1,u.push(n)),function r(e){ot.each(e,function(e,n){ot.isFunction(n)?t.unique&&c.has(n)||a.push(n):n&&n.length&&"string"!==ot.type(n)&&r(n)})}(arguments),n&&!e&&l()),this},remove:function(){return ot.each(arguments,function(t,e){for(var n;(n=ot.inArray(e,a,n))>-1;)a.splice(n,1),s>=n&&s--}),this},has:function(t){return t?ot.inArray(t,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=u=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=u=[],n||(a=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=n||[],n=[t,n.slice?n.slice():n],u.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},ot.extend({Deferred:function(t){var e=[["resolve","done",ot.Callbacks("once memory"),"resolved"],["reject","fail",ot.Callbacks("once memory"),"rejected"],["notify","progress",ot.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return ot.Deferred(function(n){ot.each(e,function(e,o){var a=ot.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&ot.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?ot.extend(t,r):r}},i={};return r.pipe=r.then,ot.each(e,function(t,o){var a=o[2],u=o[3];r[o[1]]=a.add,u&&a.add(function(){n=u},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=Z.call(arguments),a=o.length,u=1!==a||t&&ot.isFunction(t.promise)?a:0,s=1===u?t:ot.Deferred(),l=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?Z.call(arguments):i,r===e?s.notifyWith(n,r):--u||s.resolveWith(n,r)}};if(a>1)for(e=new Array(a),n=new Array(a),r=new Array(a);a>i;i++)o[i]&&ot.isFunction(o[i].promise)?o[i].promise().progress(l(i,n,e)).done(l(i,r,o)).fail(s.reject):--u;return u||s.resolveWith(r,o),s.promise()}});var kt;ot.fn.ready=function(t){return ot.ready.promise().done(t),this},ot.extend({isReady:!1,readyWait:1,holdReady:function(t){t?ot.readyWait++:ot.ready(!0)},ready:function(t){(t===!0?--ot.readyWait:ot.isReady)||(ot.isReady=!0,t!==!0&&--ot.readyWait>0||(kt.resolveWith(G,[ot]),ot.fn.triggerHandler&&(ot(G).triggerHandler("ready"),ot(G).off("ready"))))}}),ot.ready.promise=function(e){return kt||(kt=ot.Deferred(),"complete"===G.readyState||"loading"!==G.readyState&&!G.documentElement.doScroll?t.setTimeout(ot.ready):(G.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a))),kt.promise(e)},ot.ready.promise();var Mt=function(t,e,n,r,i,o,a){var u=0,s=t.length,l=null==n;if("object"===ot.type(n)){i=!0;for(u in n)Mt(t,e,u,n[u],!0,o,a)}else if(void 0!==r&&(i=!0,ot.isFunction(r)||(a=!0),l&&(a?(e.call(t,r),e=null):(l=e,e=function(t,e,n){return l.call(ot(t),n)})),e))for(;s>u;u++)e(t[u],n,a?r:r.call(t[u],u,e(t[u],n)));return i?t:l?e.call(t):s?e(t[0],n):o},_t=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};u.uid=1,u.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!_t(t))return{};var e=t[this.expando];return e||(e={},_t(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[e]=n;else for(r in e)i[r]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var r;return void 0===e||e&&"string"==typeof e&&void 0===n?(r=this.get(t,e),void 0!==r?r:this.get(t,ot.camelCase(e))):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r,i,o=t[this.expando];if(void 0!==o){if(void 0===e)this.register(t);else{ot.isArray(e)?r=e.concat(e.map(ot.camelCase)):(i=ot.camelCase(e),e in o?r=[e,i]:(r=i,r=r in o?[r]:r.match(wt)||[])),n=r.length;for(;n--;)delete o[r[n]]}(void 0===e||ot.isEmptyObject(o))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!ot.isEmptyObject(e)}};var Et=new u,Ct=new u,St=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Tt=/[A-Z]/g;ot.extend({hasData:function(t){return Ct.hasData(t)||Et.hasData(t)},data:function(t,e,n){return Ct.access(t,e,n)},removeData:function(t,e){Ct.remove(t,e)},_data:function(t,e,n){return Et.access(t,e,n)},_removeData:function(t,e){Et.remove(t,e)}}),ot.fn.extend({data:function(t,e){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===t){if(this.length&&(i=Ct.get(o),1===o.nodeType&&!Et.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=ot.camelCase(r.slice(5)),s(o,r,i[r])));Et.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each(function(){Ct.set(this,t)}):Mt(this,function(e){var n,r;if(o&&void 0===e){if(n=Ct.get(o,t)||Ct.get(o,t.replace(Tt,"-$&").toLowerCase()),void 0!==n)return n;if(r=ot.camelCase(t),n=Ct.get(o,r),void 0!==n)return n;if(n=s(o,r,void 0),void 0!==n)return n}else r=ot.camelCase(t),this.each(function(){var n=Ct.get(this,r);Ct.set(this,r,e),t.indexOf("-")>-1&&void 0!==n&&Ct.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Ct.remove(this,t)})}}),ot.extend({queue:function(t,e,n){var r;return t?(e=(e||"fx")+"queue",r=Et.get(t,e),n&&(!r||ot.isArray(n)?r=Et.access(t,e,ot.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=ot.queue(t,e),r=n.length,i=n.shift(),o=ot._queueHooks(t,e),a=function(){ot.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Et.get(t,n)||Et.access(t,n,{empty:ot.Callbacks("once memory").add(function(){Et.remove(t,[e+"queue",n])})})}}),ot.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?ot.queue(this[0],t):void 0===e?this:this.each(function(){var n=ot.queue(this,t,e);ot._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&ot.dequeue(this,t)})},dequeue:function(t){return this.each(function(){ot.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=ot.Deferred(),o=this,a=this.length,u=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";a--;)n=Et.get(o[a],t+"queueHooks"),n&&n.empty&&(r++,n.empty.add(u));return u(),i.promise(e)}});var Nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ot=new RegExp("^(?:([+-])=|)("+Nt+")([a-z%]*)$","i"),At=["Top","Right","Bottom","Left"],jt=function(t,e){return t=e||t,"none"===ot.css(t,"display")||!ot.contains(t.ownerDocument,t)},Pt=/^(?:checkbox|radio)$/i,Lt=/<([\w:-]+)/,Dt=/^$|\/(?:java|ecma)script/i,Rt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Rt.optgroup=Rt.option,Rt.tbody=Rt.tfoot=Rt.colgroup=Rt.caption=Rt.thead,Rt.th=Rt.td;var It=/<|&#?\w+;/;!function(){var t=G.createDocumentFragment(),e=t.appendChild(G.createElement("div")),n=G.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),rt.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",rt.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var qt=/^key/,Ft=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Bt=/^([^.]*)(?:\.(.+)|)/;ot.event={global:{},add:function(t,e,n,r,i){var o,a,u,s,l,c,f,h,p,d,g,v=Et.get(t);if(v)for(n.handler&&(o=n,n=o.handler,i=o.selector),n.guid||(n.guid=ot.guid++),(s=v.events)||(s=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof ot&&ot.event.triggered!==e.type?ot.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(wt)||[""],l=e.length;l--;)u=Bt.exec(e[l])||[],p=g=u[1],d=(u[2]||"").split(".").sort(),p&&(f=ot.event.special[p]||{},p=(i?f.delegateType:f.bindType)||p,f=ot.event.special[p]||{},c=ot.extend({type:p,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&ot.expr.match.needsContext.test(i),namespace:d.join(".")},o),(h=s[p])||(h=s[p]=[],h.delegateCount=0,f.setup&&f.setup.call(t,r,d,a)!==!1||t.addEventListener&&t.addEventListener(p,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?h.splice(h.delegateCount++,0,c):h.push(c),ot.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,a,u,s,l,c,f,h,p,d,g,v=Et.hasData(t)&&Et.get(t);if(v&&(s=v.events)){for(e=(e||"").match(wt)||[""],l=e.length;l--;)if(u=Bt.exec(e[l])||[],p=g=u[1],d=(u[2]||"").split(".").sort(),p){for(f=ot.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,h=s[p]||[],u=u[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=h.length;o--;)c=h[o],!i&&g!==c.origType||n&&n.guid!==c.guid||u&&!u.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,f.remove&&f.remove.call(t,c));a&&!h.length&&(f.teardown&&f.teardown.call(t,d,v.handle)!==!1||ot.removeEvent(t,p,v.handle),delete s[p])}else for(p in s)ot.event.remove(t,p+e[l],n,r,!0);ot.isEmptyObject(s)&&Et.remove(t,"handle events")}},dispatch:function(t){t=ot.event.fix(t);var e,n,r,i,o,a=[],u=Z.call(arguments),s=(Et.get(this,"events")||{})[t.type]||[],l=ot.event.special[t.type]||{};if(u[0]=t,t.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,t)!==!1){for(a=ot.event.handlers.call(this,t,s),e=0;(i=a[e++])&&!t.isPropagationStopped();)for(t.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!t.isImmediatePropagationStopped();)(!t.rnamespace||t.rnamespace.test(o.namespace))&&(t.handleObj=o,t.data=o.data,r=((ot.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u),void 0!==r&&(t.result=r)===!1&&(t.preventDefault(),t.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,r,i,o,a=[],u=e.delegateCount,s=t.target;if(u&&s.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;s!==this;s=s.parentNode||this)if(1===s.nodeType&&(s.disabled!==!0||"click"!==t.type)){for(r=[],n=0;u>n;n++)o=e[n],i=o.selector+" ",void 0===r[i]&&(r[i]=o.needsContext?ot(i,this).index(s)>-1:ot.find(i,this,null,[s]).length),r[i]&&r.push(o);r.length&&a.push({elem:s,handlers:r})}return u<e.length&&a.push({elem:this,handlers:e.slice(u)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,r,i,o=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||G,r=n.documentElement,i=n.body,t.pageX=e.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),t.which||void 0===o||(t.which=1&o?1:2&o?3:4&o?2:0),t}},fix:function(t){if(t[ot.expando])return t;var e,n,r,i=t.type,o=t,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Ft.test(i)?this.mouseHooks:qt.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,t=new ot.Event(o),e=r.length;e--;)n=r[e],t[n]=o[n];return t.target||(t.target=G),3===t.target.nodeType&&(t.target=t.target.parentNode),a.filter?a.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&ot.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return ot.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},ot.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},ot.Event=function(t,e){return this instanceof ot.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?p:d):this.type=t,e&&ot.extend(this,e),this.timeStamp=t&&t.timeStamp||ot.now(),void(this[ot.expando]=!0)):new ot.Event(t,e)},ot.Event.prototype={constructor:ot.Event,isDefaultPrevented:d,isPropagationStopped:d,isImmediatePropagationStopped:d,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=p,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=p,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=p,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},ot.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){ot.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return(!i||i!==r&&!ot.contains(r,i))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),ot.fn.extend({on:function(t,e,n,r){return v(this,t,e,n,r)},one:function(t,e,n,r){return v(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,ot(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=d),this.each(function(){ot.event.remove(this,t,n,e)})}});var zt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ht=/<script|<style|<link/i,Wt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ut=/^true\/(.*)/,$t=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;ot.extend({htmlPrefilter:function(t){return t.replace(zt,"<$1></$2>")},clone:function(t,e,n){var r,i,o,a,u=t.cloneNode(!0),s=ot.contains(t.ownerDocument,t);if(!(rt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||ot.isXMLDoc(t)))for(a=c(u),o=c(t),r=0,i=o.length;i>r;r++)w(o[r],a[r]);if(e)if(n)for(o=o||c(t),a=a||c(u),r=0,i=o.length;i>r;r++)x(o[r],a[r]);else x(t,u);return a=c(u,"script"),a.length>0&&f(a,!s&&c(t,"script")),u},cleanData:function(t){for(var e,n,r,i=ot.event.special,o=0;void 0!==(n=t[o]);o++)if(_t(n)){if(e=n[Et.expando]){if(e.events)for(r in e.events)i[r]?ot.event.remove(n,r):ot.removeEvent(n,r,e.handle);n[Et.expando]=void 0}n[Ct.expando]&&(n[Ct.expando]=void 0)}}}),ot.fn.extend({domManip:k,detach:function(t){return M(this,t,!0)},remove:function(t){return M(this,t)},text:function(t){return Mt(this,function(t){return void 0===t?ot.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return k(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=m(this,t);e.appendChild(t)}})},prepend:function(){return k(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=m(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return k(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return k(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(ot.cleanData(c(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return ot.clone(this,t,e)})},html:function(t){return Mt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ht.test(t)&&!Rt[(Lt.exec(t)||["",""])[1].toLowerCase()]){t=ot.htmlPrefilter(t);try{for(;r>n;n++)e=this[n]||{},1===e.nodeType&&(ot.cleanData(c(e,!1)),e.innerHTML=t);e=0}catch(i){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return k(this,arguments,function(e){var n=this.parentNode;ot.inArray(this,t)<0&&(ot.cleanData(c(this)),n&&n.replaceChild(e,this))},t)}}),ot.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){ot.fn[t]=function(t){for(var n,r=[],i=ot(t),o=i.length-1,a=0;o>=a;a++)n=a===o?this:this.clone(!0),ot(i[a])[e](n),K.apply(r,n.get());return this.pushStack(r)}});var Vt,Xt={HTML:"block",BODY:"block"},Yt=/^margin/,Gt=new RegExp("^("+Nt+")(?!px)[a-z%]+$","i"),Zt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Qt=function(t,e,n,r){var i,o,a={};for(o in e)a[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=a[o];return i},Kt=G.documentElement;!function(){function e(){u.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",u.innerHTML="",Kt.appendChild(a);var e=t.getComputedStyle(u);n="1%"!==e.top,o="2px"===e.marginLeft,r="4px"===e.width,u.style.marginRight="50%",i="4px"===e.marginRight,Kt.removeChild(a)}var n,r,i,o,a=G.createElement("div"),u=G.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",rt.clearCloneStyle="content-box"===u.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(u),ot.extend(rt,{pixelPosition:function(){return e(),n},boxSizingReliable:function(){return null==r&&e(),r},pixelMarginRight:function(){return null==r&&e(),i},reliableMarginLeft:function(){return null==r&&e(),o},reliableMarginRight:function(){var e,n=u.appendChild(G.createElement("div"));return n.style.cssText=u.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",u.style.width="1px",Kt.appendChild(a),e=!parseFloat(t.getComputedStyle(n).marginRight),Kt.removeChild(a),u.removeChild(n),e}}))}();var Jt=/^(none|table(?!-c[ea]).+)/,te={position:"absolute",visibility:"hidden",display:"block"},ee={letterSpacing:"0",fontWeight:"400"},ne=["Webkit","O","Moz","ms"],re=G.createElement("div").style;ot.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=C(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,a,u=ot.camelCase(e),s=t.style;return e=ot.cssProps[u]||(ot.cssProps[u]=T(u)||u),a=ot.cssHooks[e]||ot.cssHooks[u],void 0===n?a&&"get"in a&&void 0!==(i=a.get(t,!1,r))?i:s[e]:(o=typeof n,"string"===o&&(i=Ot.exec(n))&&i[1]&&(n=l(t,e,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(ot.cssNumber[u]?"":"px")),rt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(s[e]="inherit"),a&&"set"in a&&void 0===(n=a.set(t,n,r))||(s[e]=n)),void 0)}},css:function(t,e,n,r){var i,o,a,u=ot.camelCase(e);return e=ot.cssProps[u]||(ot.cssProps[u]=T(u)||u),a=ot.cssHooks[e]||ot.cssHooks[u],a&&"get"in a&&(i=a.get(t,!0,n)),void 0===i&&(i=C(t,e,r)),"normal"===i&&e in ee&&(i=ee[e]),""===n||n?(o=parseFloat(i),n===!0||isFinite(o)?o||0:i):i}}),ot.each(["height","width"],function(t,e){ot.cssHooks[e]={get:function(t,n,r){return n?Jt.test(ot.css(t,"display"))&&0===t.offsetWidth?Qt(t,te,function(){return A(t,e,r)}):A(t,e,r):void 0},set:function(t,n,r){var i,o=r&&Zt(t),a=r&&O(t,e,r,"border-box"===ot.css(t,"boxSizing",!1,o),o);return a&&(i=Ot.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=ot.css(t,e)),N(t,n,a)}}}),ot.cssHooks.marginLeft=S(rt.reliableMarginLeft,function(t,e){return e?(parseFloat(C(t,"marginLeft"))||t.getBoundingClientRect().left-Qt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px":void 0}),ot.cssHooks.marginRight=S(rt.reliableMarginRight,function(t,e){return e?Qt(t,{display:"inline-block"},C,[t,"marginRight"]):void 0}),ot.each({margin:"",padding:"",border:"Width"},function(t,e){ot.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[t+At[r]+e]=o[r]||o[r-2]||o[0];return i}},Yt.test(t)||(ot.cssHooks[t+e].set=N)}),ot.fn.extend({css:function(t,e){return Mt(this,function(t,e,n){var r,i,o={},a=0;if(ot.isArray(e)){for(r=Zt(t),i=e.length;i>a;a++)o[e[a]]=ot.css(t,e[a],!1,r);return o}return void 0!==n?ot.style(t,e,n):ot.css(t,e)},t,e,arguments.length>1)},show:function(){return j(this,!0)},hide:function(){return j(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){jt(this)?ot(this).show():ot(this).hide()})}}),ot.Tween=P,P.prototype={constructor:P,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||ot.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ot.cssNumber[n]?"":"px")},cur:function(){var t=P.propHooks[this.prop];return t&&t.get?t.get(this):P.propHooks._default.get(this)},run:function(t){var e,n=P.propHooks[this.prop];return this.options.duration?this.pos=e=ot.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=ot.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){ot.fx.step[t.prop]?ot.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[ot.cssProps[t.prop]]&&!ot.cssHooks[t.prop]?t.elem[t.prop]=t.now:ot.style(t.elem,t.prop,t.now+t.unit)}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},ot.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},ot.fx=P.prototype.init,ot.fx.step={};var ie,oe,ae=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;ot.Animation=ot.extend(F,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return l(n.elem,t,Ot.exec(e),n),n}]},tweener:function(t,e){ot.isFunction(t)?(e=t,t=["*"]):t=t.match(wt);for(var n,r=0,i=t.length;i>r;r++)n=t[r],F.tweeners[n]=F.tweeners[n]||[],F.tweeners[n].unshift(e)},prefilters:[I],prefilter:function(t,e){e?F.prefilters.unshift(t):F.prefilters.push(t)}}),ot.speed=function(t,e,n){var r=t&&"object"==typeof t?ot.extend({},t):{complete:n||!n&&e||ot.isFunction(t)&&t,duration:t,easing:n&&e||e&&!ot.isFunction(e)&&e};return r.duration=ot.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ot.fx.speeds?ot.fx.speeds[r.duration]:ot.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ot.isFunction(r.old)&&r.old.call(this),r.queue&&ot.dequeue(this,r.queue)},r},ot.fn.extend({fadeTo:function(t,e,n,r){return this.filter(jt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=ot.isEmptyObject(t),o=ot.speed(e,n,r),a=function(){var e=F(this,ot.extend({},t),o);(i||Et.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,i=null!=t&&t+"queueHooks",o=ot.timers,a=Et.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ue.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));(e||!n)&&ot.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=Et.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=ot.timers,a=r?r.length:0;for(n.finish=!0,ot.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;a>e;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),ot.each(["toggle","show","hide"],function(t,e){var n=ot.fn[e];ot.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(D(e,!0),t,r,i)}}),ot.each({slideDown:D("show"),slideUp:D("hide"),slideToggle:D("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){ot.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),ot.timers=[],ot.fx.tick=function(){var t,e=0,n=ot.timers;for(ie=ot.now();e<n.length;e++)t=n[e],
t()||n[e]!==t||n.splice(e--,1);n.length||ot.fx.stop(),ie=void 0},ot.fx.timer=function(t){ot.timers.push(t),t()?ot.fx.start():ot.timers.pop()},ot.fx.interval=13,ot.fx.start=function(){oe||(oe=t.setInterval(ot.fx.tick,ot.fx.interval))},ot.fx.stop=function(){t.clearInterval(oe),oe=null},ot.fx.speeds={slow:600,fast:200,_default:400},ot.fn.delay=function(e,n){return e=ot.fx?ot.fx.speeds[e]||e:e,n=n||"fx",this.queue(n,function(n,r){var i=t.setTimeout(n,e);r.stop=function(){t.clearTimeout(i)}})},function(){var t=G.createElement("input"),e=G.createElement("select"),n=e.appendChild(G.createElement("option"));t.type="checkbox",rt.checkOn=""!==t.value,rt.optSelected=n.selected,e.disabled=!0,rt.optDisabled=!n.disabled,t=G.createElement("input"),t.value="t",t.type="radio",rt.radioValue="t"===t.value}();var se,le=ot.expr.attrHandle;ot.fn.extend({attr:function(t,e){return Mt(this,ot.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){ot.removeAttr(this,t)})}}),ot.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?ot.prop(t,e,n):(1===o&&ot.isXMLDoc(t)||(e=e.toLowerCase(),i=ot.attrHooks[e]||(ot.expr.match.bool.test(e)?se:void 0)),void 0!==n?null===n?void ot.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:(r=ot.find.attr(t,e),null==r?void 0:r))},attrHooks:{type:{set:function(t,e){if(!rt.radioValue&&"radio"===e&&ot.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(wt);if(o&&1===t.nodeType)for(;n=o[i++];)r=ot.propFix[n]||n,ot.expr.match.bool.test(n)&&(t[r]=!1),t.removeAttribute(n)}}),se={set:function(t,e,n){return e===!1?ot.removeAttr(t,n):t.setAttribute(n,n),n}},ot.each(ot.expr.match.bool.source.match(/\w+/g),function(t,e){var n=le[e]||ot.find.attr;le[e]=function(t,e,r){var i,o;return r||(o=le[e],le[e]=i,i=null!=n(t,e,r)?e.toLowerCase():null,le[e]=o),i}});var ce=/^(?:input|select|textarea|button)$/i,fe=/^(?:a|area)$/i;ot.fn.extend({prop:function(t,e){return Mt(this,ot.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[ot.propFix[t]||t]})}}),ot.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&ot.isXMLDoc(t)||(e=ot.propFix[e]||e,i=ot.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=ot.find.attr(t,"tabindex");return e?parseInt(e,10):ce.test(t.nodeName)||fe.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),rt.optSelected||(ot.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),ot.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ot.propFix[this.toLowerCase()]=this});var he=/[\t\r\n\f]/g;ot.fn.extend({addClass:function(t){var e,n,r,i,o,a,u,s=0;if(ot.isFunction(t))return this.each(function(e){ot(this).addClass(t.call(this,e,B(this)))});if("string"==typeof t&&t)for(e=t.match(wt)||[];n=this[s++];)if(i=B(n),r=1===n.nodeType&&(" "+i+" ").replace(he," ")){for(a=0;o=e[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");u=ot.trim(r),i!==u&&n.setAttribute("class",u)}return this},removeClass:function(t){var e,n,r,i,o,a,u,s=0;if(ot.isFunction(t))return this.each(function(e){ot(this).removeClass(t.call(this,e,B(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(wt)||[];n=this[s++];)if(i=B(n),r=1===n.nodeType&&(" "+i+" ").replace(he," ")){for(a=0;o=e[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");u=ot.trim(r),i!==u&&n.setAttribute("class",u)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):ot.isFunction(t)?this.each(function(n){ot(this).toggleClass(t.call(this,n,B(this),e),e)}):this.each(function(){var e,r,i,o;if("string"===n)for(r=0,i=ot(this),o=t.match(wt)||[];e=o[r++];)i.hasClass(e)?i.removeClass(e):i.addClass(e);else(void 0===t||"boolean"===n)&&(e=B(this),e&&Et.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":Et.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+B(n)+" ").replace(he," ").indexOf(e)>-1)return!0;return!1}});var pe=/\r/g,de=/[\x20\t\r\n\f]+/g;ot.fn.extend({val:function(t){var e,n,r,i=this[0];{if(arguments.length)return r=ot.isFunction(t),this.each(function(n){var i;1===this.nodeType&&(i=r?t.call(this,n,ot(this).val()):t,null==i?i="":"number"==typeof i?i+="":ot.isArray(i)&&(i=ot.map(i,function(t){return null==t?"":t+""})),e=ot.valHooks[this.type]||ot.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))});if(i)return e=ot.valHooks[i.type]||ot.valHooks[i.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(pe,""):null==n?"":n)}}}),ot.extend({valHooks:{option:{get:function(t){var e=ot.find.attr(t,"value");return null!=e?e:ot.trim(ot.text(t)).replace(de," ")}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||0>i,a=o?null:[],u=o?i+1:r.length,s=0>i?u:o?i:0;u>s;s++)if(n=r[s],(n.selected||s===i)&&(rt.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!ot.nodeName(n.parentNode,"optgroup"))){if(e=ot(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=ot.makeArray(e),a=i.length;a--;)r=i[a],(r.selected=ot.inArray(ot.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),ot.each(["radio","checkbox"],function(){ot.valHooks[this]={set:function(t,e){return ot.isArray(e)?t.checked=ot.inArray(ot(t).val(),e)>-1:void 0}},rt.checkOn||(ot.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ge=/^(?:focusinfocus|focusoutblur)$/;ot.extend(ot.event,{trigger:function(e,n,r,i){var o,a,u,s,l,c,f,h=[r||G],p=nt.call(e,"type")?e.type:e,d=nt.call(e,"namespace")?e.namespace.split("."):[];if(a=u=r=r||G,3!==r.nodeType&&8!==r.nodeType&&!ge.test(p+ot.event.triggered)&&(p.indexOf(".")>-1&&(d=p.split("."),p=d.shift(),d.sort()),l=p.indexOf(":")<0&&"on"+p,e=e[ot.expando]?e:new ot.Event(p,"object"==typeof e&&e),e.isTrigger=i?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),n=null==n?[e]:ot.makeArray(n,[e]),f=ot.event.special[p]||{},i||!f.trigger||f.trigger.apply(r,n)!==!1)){if(!i&&!f.noBubble&&!ot.isWindow(r)){for(s=f.delegateType||p,ge.test(s+p)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(r.ownerDocument||G)&&h.push(u.defaultView||u.parentWindow||t)}for(o=0;(a=h[o++])&&!e.isPropagationStopped();)e.type=o>1?s:f.bindType||p,c=(Et.get(a,"events")||{})[e.type]&&Et.get(a,"handle"),c&&c.apply(a,n),c=l&&a[l],c&&c.apply&&_t(a)&&(e.result=c.apply(a,n),e.result===!1&&e.preventDefault());return e.type=p,i||e.isDefaultPrevented()||f._default&&f._default.apply(h.pop(),n)!==!1||!_t(r)||l&&ot.isFunction(r[p])&&!ot.isWindow(r)&&(u=r[l],u&&(r[l]=null),ot.event.triggered=p,r[p](),ot.event.triggered=void 0,u&&(r[l]=u)),e.result}},simulate:function(t,e,n){var r=ot.extend(new ot.Event,n,{type:t,isSimulated:!0});ot.event.trigger(r,null,e)}}),ot.fn.extend({trigger:function(t,e){return this.each(function(){ot.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?ot.event.trigger(t,e,n,!0):void 0}}),ot.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){ot.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),ot.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),rt.focusin="onfocusin"in t,rt.focusin||ot.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){ot.event.simulate(e,t.target,ot.event.fix(t))};ot.event.special[e]={setup:function(){var r=this.ownerDocument||this,i=Et.access(r,e);i||r.addEventListener(t,n,!0),Et.access(r,e,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=Et.access(r,e)-1;i?Et.access(r,e,i):(r.removeEventListener(t,n,!0),Et.remove(r,e))}}});var ve=t.location,me=ot.now(),ye=/\?/;ot.parseJSON=function(t){return JSON.parse(t+"")},ot.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(r){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&ot.error("Invalid XML: "+e),n};var be=/#.*$/,xe=/([?&])_=[^&]*/,we=/^(.*?):[ \t]*([^\r\n]*)$/gm,ke=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Me=/^(?:GET|HEAD)$/,_e=/^\/\//,Ee={},Ce={},Se="*/".concat("*"),Te=G.createElement("a");Te.href=ve.href,ot.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ve.href,type:"GET",isLocal:ke.test(ve.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Se,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":ot.parseJSON,"text xml":ot.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?W(W(t,ot.ajaxSettings),e):W(ot.ajaxSettings,t)},ajaxPrefilter:z(Ee),ajaxTransport:z(Ce),ajax:function(e,n){function r(e,n,r,u){var l,f,y,b,w,M=n;2!==x&&(x=2,s&&t.clearTimeout(s),i=void 0,a=u||"",k.readyState=e>0?4:0,l=e>=200&&300>e||304===e,r&&(b=U(h,k,r)),b=$(h,b,k,l),l?(h.ifModified&&(w=k.getResponseHeader("Last-Modified"),w&&(ot.lastModified[o]=w),w=k.getResponseHeader("etag"),w&&(ot.etag[o]=w)),204===e||"HEAD"===h.type?M="nocontent":304===e?M="notmodified":(M=b.state,f=b.data,y=b.error,l=!y)):(y=M,(e||!M)&&(M="error",0>e&&(e=0))),k.status=e,k.statusText=(n||M)+"",l?g.resolveWith(p,[f,M,k]):g.rejectWith(p,[k,M,y]),k.statusCode(m),m=void 0,c&&d.trigger(l?"ajaxSuccess":"ajaxError",[k,h,l?f:y]),v.fireWith(p,[k,M]),c&&(d.trigger("ajaxComplete",[k,h]),--ot.active||ot.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=void 0),n=n||{};var i,o,a,u,s,l,c,f,h=ot.ajaxSetup({},n),p=h.context||h,d=h.context&&(p.nodeType||p.jquery)?ot(p):ot.event,g=ot.Deferred(),v=ot.Callbacks("once memory"),m=h.statusCode||{},y={},b={},x=0,w="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(2===x){if(!u)for(u={};e=we.exec(a);)u[e[1].toLowerCase()]=e[2];e=u[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return x||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return x||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>x)for(e in t)m[e]=[m[e],t[e]];else k.always(t[k.status]);return this},abort:function(t){var e=t||w;return i&&i.abort(e),r(0,e),this}};if(g.promise(k).complete=v.add,k.success=k.done,k.error=k.fail,h.url=((e||h.url||ve.href)+"").replace(be,"").replace(_e,ve.protocol+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=ot.trim(h.dataType||"*").toLowerCase().match(wt)||[""],null==h.crossDomain){l=G.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Te.protocol+"//"+Te.host!=l.protocol+"//"+l.host}catch(M){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=ot.param(h.data,h.traditional)),H(Ee,h,n,k),2===x)return k;c=ot.event&&h.global,c&&0===ot.active++&&ot.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Me.test(h.type),o=h.url,h.hasContent||(h.data&&(o=h.url+=(ye.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=xe.test(o)?o.replace(xe,"$1_="+me++):o+(ye.test(o)?"&":"?")+"_="+me++)),h.ifModified&&(ot.lastModified[o]&&k.setRequestHeader("If-Modified-Since",ot.lastModified[o]),ot.etag[o]&&k.setRequestHeader("If-None-Match",ot.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&k.setRequestHeader("Content-Type",h.contentType),k.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Se+"; q=0.01":""):h.accepts["*"]);for(f in h.headers)k.setRequestHeader(f,h.headers[f]);if(h.beforeSend&&(h.beforeSend.call(p,k,h)===!1||2===x))return k.abort();w="abort";for(f in{success:1,error:1,complete:1})k[f](h[f]);if(i=H(Ce,h,n,k)){if(k.readyState=1,c&&d.trigger("ajaxSend",[k,h]),2===x)return k;h.async&&h.timeout>0&&(s=t.setTimeout(function(){k.abort("timeout")},h.timeout));try{x=1,i.send(y,r)}catch(M){if(!(2>x))throw M;r(-1,M)}}else r(-1,"No Transport");return k},getJSON:function(t,e,n){return ot.get(t,e,n,"json")},getScript:function(t,e){return ot.get(t,void 0,e,"script")}}),ot.each(["get","post"],function(t,e){ot[e]=function(t,n,r,i){return ot.isFunction(n)&&(i=i||r,r=n,n=void 0),ot.ajax(ot.extend({url:t,type:e,dataType:i,data:n,success:r},ot.isPlainObject(t)&&t))}}),ot._evalUrl=function(t){return ot.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},ot.fn.extend({wrapAll:function(t){var e;return ot.isFunction(t)?this.each(function(e){ot(this).wrapAll(t.call(this,e))}):(this[0]&&(e=ot(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return ot.isFunction(t)?this.each(function(e){ot(this).wrapInner(t.call(this,e))}):this.each(function(){var e=ot(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=ot.isFunction(t);return this.each(function(n){ot(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){ot.nodeName(this,"body")||ot(this).replaceWith(this.childNodes)}).end()}}),ot.expr.filters.hidden=function(t){return!ot.expr.filters.visible(t)},ot.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Ne=/%20/g,Oe=/\[\]$/,Ae=/\r?\n/g,je=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;ot.param=function(t,e){var n,r=[],i=function(t,e){e=ot.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=ot.ajaxSettings&&ot.ajaxSettings.traditional),ot.isArray(t)||t.jquery&&!ot.isPlainObject(t))ot.each(t,function(){i(this.name,this.value)});else for(n in t)V(n,t[n],e,i);return r.join("&").replace(Ne,"+")},ot.fn.extend({serialize:function(){return ot.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=ot.prop(this,"elements");return t?ot.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!ot(this).is(":disabled")&&Pe.test(this.nodeName)&&!je.test(t)&&(this.checked||!Pt.test(t))}).map(function(t,e){var n=ot(this).val();return null==n?null:ot.isArray(n)?ot.map(n,function(t){return{name:e.name,value:t.replace(Ae,"\r\n")}}):{name:e.name,value:n.replace(Ae,"\r\n")}}).get()}}),ot.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(e){}};var Le={0:200,1223:204},De=ot.ajaxSettings.xhr();rt.cors=!!De&&"withCredentials"in De,rt.ajax=De=!!De,ot.ajaxTransport(function(e){var n,r;return rt.cors||De&&!e.crossDomain?{send:function(i,o){var a,u=e.xhr();if(u.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)u[a]=e.xhrFields[a];e.mimeType&&u.overrideMimeType&&u.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");for(a in i)u.setRequestHeader(a,i[a]);n=function(t){return function(){n&&(n=r=u.onload=u.onerror=u.onabort=u.onreadystatechange=null,"abort"===t?u.abort():"error"===t?"number"!=typeof u.status?o(0,"error"):o(u.status,u.statusText):o(Le[u.status]||u.status,u.statusText,"text"!==(u.responseType||"text")||"string"!=typeof u.responseText?{binary:u.response}:{text:u.responseText},u.getAllResponseHeaders()))}},u.onload=n(),r=u.onerror=n("error"),void 0!==u.onabort?u.onabort=r:u.onreadystatechange=function(){4===u.readyState&&t.setTimeout(function(){n&&r()})},n=n("abort");try{u.send(e.hasContent&&e.data||null)}catch(s){if(n)throw s}},abort:function(){n&&n()}}:void 0}),ot.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return ot.globalEval(t),t}}}),ot.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),ot.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=ot("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),G.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Re=[],Ie=/(=)\?(?=&|$)|\?\?/;ot.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Re.pop()||ot.expando+"_"+me++;return this[t]=!0,t}}),ot.ajaxPrefilter("json jsonp",function(e,n,r){var i,o,a,u=e.jsonp!==!1&&(Ie.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ie.test(e.data)&&"data");return u||"jsonp"===e.dataTypes[0]?(i=e.jsonpCallback=ot.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Ie,"$1"+i):e.jsonp!==!1&&(e.url+=(ye.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return a||ot.error(i+" was not called"),a[0]},e.dataTypes[0]="json",o=t[i],t[i]=function(){a=arguments},r.always(function(){void 0===o?ot(t).removeProp(i):t[i]=o,e[i]&&(e.jsonpCallback=n.jsonpCallback,Re.push(i)),a&&ot.isFunction(o)&&o(a[0]),a=o=void 0}),"script"):void 0}),ot.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||G;var r=dt.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=h([t],e,i),i&&i.length&&ot(i).remove(),ot.merge([],r.childNodes))};var qe=ot.fn.load;ot.fn.load=function(t,e,n){if("string"!=typeof t&&qe)return qe.apply(this,arguments);var r,i,o,a=this,u=t.indexOf(" ");return u>-1&&(r=ot.trim(t.slice(u)),t=t.slice(0,u)),ot.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),a.length>0&&ot.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done(function(t){o=arguments,a.html(r?ot("<div>").append(ot.parseHTML(t)).find(r):t)}).always(n&&function(t,e){a.each(function(){n.apply(this,o||[t.responseText,e,t])})}),this},ot.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){ot.fn[e]=function(t){return this.on(e,t)}}),ot.expr.filters.animated=function(t){return ot.grep(ot.timers,function(e){return t===e.elem}).length},ot.offset={setOffset:function(t,e,n){var r,i,o,a,u,s,l,c=ot.css(t,"position"),f=ot(t),h={};"static"===c&&(t.style.position="relative"),u=f.offset(),o=ot.css(t,"top"),s=ot.css(t,"left"),l=("absolute"===c||"fixed"===c)&&(o+s).indexOf("auto")>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(s)||0),ot.isFunction(e)&&(e=e.call(t,n,ot.extend({},u))),null!=e.top&&(h.top=e.top-u.top+a),null!=e.left&&(h.left=e.left-u.left+i),"using"in e?e.using.call(t,h):f.css(h)}},ot.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){ot.offset.setOffset(this,t,e)});var e,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;if(o)return e=o.documentElement,ot.contains(e,r)?(i=r.getBoundingClientRect(),n=X(o),{top:i.top+n.pageYOffset-e.clientTop,left:i.left+n.pageXOffset-e.clientLeft}):i},position:function(){if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===ot.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),ot.nodeName(t[0],"html")||(r=t.offset()),r.top+=ot.css(t[0],"borderTopWidth",!0),r.left+=ot.css(t[0],"borderLeftWidth",!0)),{top:e.top-r.top-ot.css(n,"marginTop",!0),left:e.left-r.left-ot.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===ot.css(t,"position");)t=t.offsetParent;return t||Kt})}}),ot.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;ot.fn[t]=function(r){return Mt(this,function(t,r,i){var o=X(t);return void 0===i?o?o[e]:t[r]:void(o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i)},t,r,arguments.length)}}),ot.each(["top","left"],function(t,e){ot.cssHooks[e]=S(rt.pixelPosition,function(t,n){return n?(n=C(t,e),Gt.test(n)?ot(t).position()[e]+"px":n):void 0})}),ot.each({Height:"height",Width:"width"},function(t,e){ot.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){ot.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Mt(this,function(e,n,r){var i;return ot.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(i=e.documentElement,Math.max(e.body["scroll"+t],i["scroll"+t],e.body["offset"+t],i["offset"+t],i["client"+t])):void 0===r?ot.css(e,n,a):ot.style(e,n,r,a)},e,o?r:void 0,o,null)}})}),ot.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},size:function(){return this.length}}),ot.fn.andSelf=ot.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ot});var Fe=t.jQuery,Be=t.$;return ot.noConflict=function(e){return t.$===ot&&(t.$=Be),e&&t.jQuery===ot&&(t.jQuery=Fe),ot},e||(t.jQuery=t.$=ot),ot}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("nbpresent-deps",[],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.nbpresentDeps=t()}}(function(){var t;return function e(t,n,r){function i(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function i(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t){return"λ"+t.map(function(t){return y["default"]["function"](t)||y["default"].object(t)?"#"+j()+"#":t}).join("λ")}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=o,n=a,r=!0,u=l=void 0}},c=t("emmett"),f=i(c),h=t("./cursor"),p=i(h),d=t("./monkey"),g=t("./watcher"),v=i(g),m=t("./type"),y=i(m),b=t("./update"),x=i(b),w=t("./helpers"),k=r(w),M=k.arrayFrom,_=k.coercePath,E=k.deepFreeze,C=k.getIn,S=k.makeError,T=k.deepClone,N=k.deepMerge,O=k.shallowClone,A=k.shallowMerge,j=k.uniqid,P={autoCommit:!0,asynchronous:!0,immutable:!0,lazyMonkeys:!0,persistent:!0,pure:!0,validate:null,validationBehavior:"rollback"},L=function(t){function e(t,n){var r=this;if(o(this,e),l(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),arguments.length<1&&(t={}),!y["default"].object(t)&&!y["default"].array(t))throw S("Baobab: invalid data.",{data:t});this.options=A({},P,n),this.options.persistent||(this.options.immutable=!1,this.options.pure=!1),this._identity="[object Baobab]",this._cursors={},this._future=null,this._transaction=[],this._affectedPathsIndex={},this._monkeys={},this._previousData=null,this._data=t,this.root=new p["default"](this,[],"λ"),delete this.root.release,this.options.immutable&&E(this._data);var i=function(t){r[t]=function(){var e=this.root[t].apply(this.root,arguments);return e instanceof p["default"]?this:e}};["apply","clone","concat","deepClone","deepMerge","exists","get","push","merge","pop","project","serialize","set","shift","splice","unset","unshift"].forEach(i),this._refreshMonkeys();var a=this.validate();if(a)throw Error("Baobab: invalid data.",{error:a})}return a(e,t),s(e,[{key:"_refreshMonkeys",value:function(t,e,n){var r=this,i=function u(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];if(t instanceof d.Monkey)return t.release(),void(0,x["default"])(r._monkeys,e,{type:"unset"},{immutable:!1,persistent:!1,pure:!1});if(y["default"].object(t))for(var n in t)u(t[n],e.concat(n))},o=function s(t){var e=arguments.length<=1||void 0===arguments[1]?[]:arguments[1];if(t instanceof d.MonkeyDefinition||t instanceof d.Monkey){var n=new d.Monkey(r,e,t instanceof d.Monkey?t.definition:t);return void(0,x["default"])(r._monkeys,e,{type:"set",value:n},{immutable:!1,persistent:!1,pure:!1})}if(y["default"].object(t))for(var i in t)s(t[i],e.concat(i))};if(arguments.length){var a=C(this._monkeys,e).data;a&&i(a,e),"unset"!==n&&o(t,e)}else o(this._data);return this}},{key:"validate",value:function n(t){var e=this.options,n=e.validate,r=e.validationBehavior;if("function"!=typeof n)return null;var i=n.call(this,this._previousData,this._data,t||[[]]);return i instanceof Error?("rollback"===r&&(this._data=this._previousData,this._affectedPathsIndex={},this._transaction=[],this._previousData=this._data),this.emit("invalid",{error:i}),i):null}},{key:"select",value:function(t){if(t=t||[],arguments.length>1&&(t=M(arguments)),!y["default"].path(t))throw S("Baobab.select: invalid path.",{path:t});t=[].concat(t);var e=u(t),n=this._cursors[e];return n||(n=new p["default"](this,t,e),this._cursors[e]=n),this.emit("select",{path:t,cursor:n}),n}},{key:"update",value:function(t,e){var n=this;if(t=_(t),!y["default"].operationType(e.type))throw S('Baobab.update: unknown operation type "'+e.type+'".',{operation:e});var r=C(this._data,t),i=r.solvedPath,o=r.exists;if(!i)throw S("Baobab.update: could not solve the given path.",{path:i});var a=y["default"].monkeyPath(this._monkeys,i);if(a&&i.length>a.length)throw S("Baobab.update: attempting to update a read-only path.",{path:i});if("unset"!==e.type||o){var s=e;if(/merge/i.test(e.type)){var l=C(this._monkeys,i).data;if(y["default"].object(l)){s=O(s);var c=C(this._data,i).data;/deep/i.test(s.type)?s.value=N({},N({},c,T(l)),s.value):s.value=A({},N({},c,T(l)),s.value)}}this._transaction.length||(this._previousData=this._data);var f=(0,x["default"])(this._data,i,s,this.options),h=f.data,p=f.node;if(!("data"in f))return p;var d=i.concat("push"===e.type?p.length-1:[]),g=u(d);return this._data=h,this._affectedPathsIndex[g]=!0,this._transaction.push(A({},e,{path:d})),this._refreshMonkeys(p,i,e.type),this.emit("write",{path:d}),this.options.autoCommit?this.options.asynchronous?(this._future||(this._future=setTimeout(function(){return n.commit()},0)),p):(this.commit(),p):p}}},{key:"commit",value:function(){if(!this._transaction.length)return this;this._future&&(this._future=clearTimeout(this._future));var t=Object.keys(this._affectedPathsIndex).map(function(t){return"λ"!==t?t.split("λ").slice(1):[]}),e=this.validate(t);if(e)return this;var n=this._transaction,r=this._previousData;return this._affectedPathsIndex={},this._transaction=[],this._previousData=this._data,this.emit("update",{paths:t,currentData:this._data,transaction:n,previousData:r}),this}},{key:"getMonkey",value:function(t){t=_(t);var e=C(this._monkeys,[].concat(t)).data;return e instanceof d.Monkey?e:null}},{key:"watch",value:function(t){return new v["default"](this,t)}},{key:"release",value:function(){var t=void 0;this.emit("release"),delete this.root,delete this._data,delete this._previousData,delete this._transaction,delete this._affectedPathsIndex,delete this._monkeys;for(t in this._cursors)this._cursors[t].release();delete this._cursors,this.kill()}},{key:"toJSON",value:function(){return this.serialize()}},{key:"toString",value:function(){return this._identity}}]),e}(f["default"]);n["default"]=L,L.monkey=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];if(!e.length)throw new Error("Baobab.monkey: missing definition.");return 1===e.length&&"function"!=typeof e[0]?new d.MonkeyDefinition(e[0]):new d.MonkeyDefinition(e)},L.dynamicNode=L.monkey,L.Cursor=p["default"],L.MonkeyDefinition=d.MonkeyDefinition,L.Monkey=d.Monkey,L.type=y["default"],L.helpers=k,L.VERSION="2.3.2",e.exports=n["default"]},{"./cursor":2,"./helpers":3,"./monkey":4,"./type":5,"./update":6,"./watcher":7,emmett:9}],2:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){if(!e)throw(0,g.makeError)("Baobab.Cursor."+t+": "+("cannot use "+t+" on an unresolved dynamic path."),{path:e})}function u(t,e){v.prototype[t]=function(n,r){if(arguments.length>2)throw(0,g.makeError)("Baobab.Cursor."+t+": too many arguments.");if(1!==arguments.length||m[t]||(r=n,n=[]),n=(0,g.coercePath)(n),!d["default"].path(n))throw(0,g.makeError)("Baobab.Cursor."+t+": invalid path.",{path:n});if(e&&!e(r))throw(0,g.makeError)("Baobab.Cursor."+t+": invalid value.",{path:n,value:r});if(!this.solvedPath)throw(0,g.makeError)("Baobab.Cursor."+t+": the dynamic path of the cursor cannot be solved.",{path:this.path});var i=this.solvedPath.concat(n);return this.tree.update(i,{type:t,value:r})}}Object.defineProperty(n,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),l=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=o,n=a,r=!0,u=l=void 0}},c=t("emmett"),f=r(c),h=t("./monkey"),p=t("./type"),d=r(p),g=t("./helpers"),v=function(t){function e(t,n,r){var o=this;i(this,e),l(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),n=n||[],this._identity="[object Cursor]",this._archive=null,
this.tree=t,this.path=n,this.hash=r,this.state={killed:!1,recording:!1,undoing:!1},this._dynamicPath=d["default"].dynamicPath(this.path),this._monkeyPath=d["default"].monkeyPath(this.tree._monkeys,this.path),this._dynamicPath?this.solvedPath=(0,g.getIn)(this.tree._data,this.path).solvedPath:this.solvedPath=this.path,this._writeHandler=function(t){var e=t.data;!o.state.killed&&(0,g.solveUpdate)([e.path],o._getComparedPaths())&&(o.solvedPath=(0,g.getIn)(o.tree._data,o.path).solvedPath)};var a=function(t){var e=o,n=Object.defineProperties({},{previousData:{get:function(){return(0,g.getIn)(t,e.solvedPath).data},configurable:!0,enumerable:!0},currentData:{get:function(){return e.get()},configurable:!0,enumerable:!0}});return o.state.recording&&!o.state.undoing&&o.archive.add(n.previousData),o.state.undoing=!1,o.emit("update",n)};this._updateHandler=function(t){if(!o.state.killed){var e=t.data,n=e.paths,r=e.previousData,i=a.bind(o,r),u=o._getComparedPaths();return(0,g.solveUpdate)(n,u)?i():void 0}};var u=!1;this._lazyBind=function(){return u?void 0:(u=!0,o._dynamicPath&&o.tree.on("write",o._writeHandler),o.tree.on("update",o._updateHandler))},this._dynamicPath?this._lazyBind():(this.on=(0,g.before)(this._lazyBind,this.on.bind(this)),this.once=(0,g.before)(this._lazyBind,this.once.bind(this)))}return o(e,t),s(e,[{key:"_getComparedPaths",value:function(){var t=this._monkeyPath?(0,g.getIn)(this.tree._monkeys,this._monkeyPath).data.relatedPaths():[];return[this.solvedPath].concat(t)}},{key:"isRoot",value:function(){return!this.path.length}},{key:"isLeaf",value:function(){return d["default"].primitive(this._get().data)}},{key:"isBranch",value:function(){return!this.isRoot()&&!this.isLeaf()}},{key:"root",value:function(){return this.tree.select()}},{key:"select",value:function(t){return arguments.length>1&&(t=(0,g.arrayFrom)(arguments)),this.tree.select(this.path.concat(t))}},{key:"up",value:function(){return this.isRoot()?null:this.tree.select(this.path.slice(0,-1))}},{key:"down",value:function(){if(a("down",this.solvedPath),!(this._get().data instanceof Array))throw Error("Baobab.Cursor.down: cannot go down on a non-list type.");return this.tree.select(this.solvedPath.concat(0))}},{key:"left",value:function(){a("left",this.solvedPath);var t=+this.solvedPath[this.solvedPath.length-1];if(isNaN(t))throw Error("Baobab.Cursor.left: cannot go left on a non-list type.");return t?this.tree.select(this.solvedPath.slice(0,-1).concat(t-1)):null}},{key:"right",value:function(){a("right",this.solvedPath);var t=+this.solvedPath[this.solvedPath.length-1];if(isNaN(t))throw Error("Baobab.Cursor.right: cannot go right on a non-list type.");return t+1===this.up()._get().data.length?null:this.tree.select(this.solvedPath.slice(0,-1).concat(t+1))}},{key:"leftmost",value:function(){a("leftmost",this.solvedPath);var t=+this.solvedPath[this.solvedPath.length-1];if(isNaN(t))throw Error("Baobab.Cursor.leftmost: cannot go left on a non-list type.");return this.tree.select(this.solvedPath.slice(0,-1).concat(0))}},{key:"rightmost",value:function(){a("rightmost",this.solvedPath);var t=+this.solvedPath[this.solvedPath.length-1];if(isNaN(t))throw Error("Baobab.Cursor.rightmost: cannot go right on a non-list type.");var e=this.up()._get().data;return this.tree.select(this.solvedPath.slice(0,-1).concat(e.length-1))}},{key:"map",value:function(t,e){a("map",this.solvedPath);var n=this._get().data,r=arguments.length;if(!d["default"].array(n))throw Error("baobab.Cursor.map: cannot map a non-list type.");return n.map(function(i,o){return t.call(r>1?e:this,this.select(o),o,n)},this)}},{key:"_get",value:function(){var t=arguments.length<=0||void 0===arguments[0]?[]:arguments[0];if(!d["default"].path(t))throw(0,g.makeError)("Baobab.Cursor.getters: invalid path.",{path:t});return this.solvedPath?(0,g.getIn)(this.tree._data,this.solvedPath.concat(t)):{data:void 0,solvedPath:null,exists:!1}}},{key:"exists",value:function(t){return t=(0,g.coercePath)(t),arguments.length>1&&(t=(0,g.arrayFrom)(arguments)),this._get(t).exists}},{key:"get",value:function(t){t=(0,g.coercePath)(t),arguments.length>1&&(t=(0,g.arrayFrom)(arguments));var e=this._get(t),n=e.data,r=e.solvedPath;return this.tree.emit("get",{data:n,solvedPath:r,path:this.path.concat(t)}),n}},{key:"clone",value:function(){var t=this.get.apply(this,arguments);return(0,g.shallowClone)(t)}},{key:"deepClone",value:function(){var t=this.get.apply(this,arguments);return(0,g.deepClone)(t)}},{key:"serialize",value:function(t){if(t=(0,g.coercePath)(t),arguments.length>1&&(t=(0,g.arrayFrom)(arguments)),!d["default"].path(t))throw(0,g.makeError)("Baobab.Cursor.getters: invalid path.",{path:t});if(this.solvedPath){var e=this.solvedPath.concat(t),n=(0,g.deepClone)((0,g.getIn)(this.tree._data,e).data),r=(0,g.getIn)(this.tree._monkeys,e).data,i=function o(t,e){if(d["default"].object(e)&&d["default"].object(t))for(var n in e)e[n]instanceof h.Monkey?delete t[n]:o(t[n],e[n])};return i(n,r),n}}},{key:"project",value:function(t){if(d["default"].object(t)){var e={};for(var n in t)e[n]=this.get(t[n]);return e}if(d["default"].array(t)){for(var e=[],r=0,i=t.length;i>r;r++)e.push(this.get(t[r]));return e}throw(0,g.makeError)("Baobab.Cursor.project: wrong projection.",{projection:t})}},{key:"startRecording",value:function(t){if(t=t||1/0,1>t)throw(0,g.makeError)("Baobab.Cursor.startRecording: invalid max records.",{value:t});return this.state.recording=!0,this.archive?this:(this._lazyBind(),this.archive=new g.Archive(t),this)}},{key:"stopRecording",value:function(){return this.state.recording=!1,this}},{key:"undo",value:function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0];if(!this.state.recording)throw new Error("Baobab.Cursor.undo: cursor is not recording.");var e=this.archive.back(t);if(!e)throw Error("Baobab.Cursor.undo: cannot find a relevant record.");return this.state.undoing=!0,this.set(e),this}},{key:"hasHistory",value:function(){return!(!this.archive||!this.archive.get().length)}},{key:"getHistory",value:function(){return this.archive?this.archive.get():[]}},{key:"clearHistory",value:function(){return this.archive&&this.archive.clear(),this}},{key:"release",value:function(){this._dynamicPath&&this.tree.off("write",this._writeHandler),this.tree.off("update",this._updateHandler),this.hash&&delete this.tree._cursors[this.hash],delete this.tree,delete this.path,delete this.solvedPath,delete this.archive,this.kill(),this.state.killed=!0}},{key:"toJSON",value:function(){return this.serialize()}},{key:"toString",value:function(){return this._identity}}]),e}(f["default"]);n["default"]=v,"function"==typeof Symbol&&"undefined"!=typeof Symbol.iterator&&(v.prototype[Symbol.iterator]=function(){var t=this._get().data;if(!d["default"].array(t))throw Error("baobab.Cursor.@@iterate: cannot iterate a non-list type.");var e=0,n=this,r=t.length;return{next:function(){return r>e?{value:n.select(e++)}:{done:!0}}}});var m={unset:!0,pop:!0,shift:!0};u("set"),u("unset"),u("apply",d["default"]["function"]),u("push"),u("concat",d["default"].array),u("unshift"),u("pop"),u("shift"),u("splice",d["default"].splicer),u("merge",d["default"].object),u("deepMerge",d["default"].object),e.exports=n["default"]},{"./helpers":3,"./monkey":4,"./type":5,emmett:9}],3:[function(t,e,n){(function(e){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){var n=void 0,r=void 0;for(n=0,r=t.length;r>n;n++)if(e(t[n]))return n;return-1}function a(t){var e=new Array(t.length),n=void 0,r=void 0;for(n=0,r=t.length;r>n;n++)e[n]=t[n];return e}function u(t){return a(t)}function s(t,e){return function(){t.apply(null,arguments),e.apply(null,arguments)}}function l(t){var e=t.source,n="";return t.global&&(n+="g"),t.multiline&&(n+="m"),t.ignoreCase&&(n+="i"),t.sticky&&(n+="y"),t.unicode&&(n+="u"),new RegExp(e,n)}function c(t,n){if(!n||"object"!=typeof n||n instanceof Error||n instanceof w.MonkeyDefinition||n instanceof w.Monkey||"ArrayBuffer"in e&&n instanceof ArrayBuffer)return n;if(M["default"].array(n)){if(t){var r=[],i=void 0,o=void 0;for(i=0,o=n.length;o>i;i++)r.push(c(!0,n[i]));return r}return a(n)}if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp)return l(n);if(M["default"].object(n)){var u={},s=void 0;for(s in n)M["default"].lazyGetter(n,s)?Object.defineProperty(u,s,{get:Object.getOwnPropertyDescriptor(n,s).get,enumerable:!0,configurable:!0}):n.hasOwnProperty(s)&&(u[s]=t?c(!0,n[s]):n[s]);return u}return n}function f(t){return t||0===t||""===t?t:[]}function h(t,e){var n=!0,r=void 0;if(!t)return!1;for(r in e)if(M["default"].object(e[r]))n=n&&h(t[r],e[r]);else if(M["default"].array(e[r]))n=n&&!!~e[r].indexOf(t[r]);else if(t[r]!==e[r])return!1;return n}function p(t,e){if(!("object"!=typeof e||null===e||e instanceof w.Monkey)&&(Object.freeze(e),t))if(Array.isArray(e)){var n=void 0,r=void 0;for(n=0,r=e.length;r>n;n++)p(!0,e[n])}else{var i=void 0,o=void 0;for(o in e)M["default"].lazyGetter(e,o)||(i=e[o],i&&e.hasOwnProperty(o)&&"object"==typeof i&&!Object.isFrozen(i)&&p(!0,i))}}function d(t,e){if(!e)return A;var n=[],r=!0,i=t,a=void 0,u=void 0,s=void 0;for(u=0,s=e.length;s>u;u++){if(!i)return{data:void 0,solvedPath:n.concat(e.slice(u)),exists:!1};if("function"==typeof e[u]){if(!M["default"].array(i))return A;if(a=o(i,e[u]),!~a)return A;n.push(a),i=i[a]}else if("object"==typeof e[u]){if(!M["default"].array(i))return A;if(a=o(i,function(t){return h(t,e[u])}),!~a)return A;n.push(a),i=i[a]}else n.push(e[u]),r="object"==typeof i&&e[u]in i,i=i[e[u]]}return{data:i,solvedPath:n,exists:r}}function g(t,e){var n=new Error(t);for(var r in e)n[r]=e[r];return n}function v(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;e>r;r++)n[r-1]=arguments[r];var i=n[0],o=void 0,a=void 0,u=void 0,s=void 0;for(a=1,u=n.length;u>a;a++){o=n[a];for(s in o)!t||!M["default"].object(o[s])||o[s]instanceof w.Monkey?i[s]=o[s]:i[s]=v(!0,i[s]||{},o[s])}return i}function m(t,e){var n=[];e=[].concat(e);for(var r=0,i=e.length;i>r;r++){var o=e[r];"."===o?r||(n=t.slice(0)):".."===o?n=(r?n:t).slice(0,-1):n.push(o)}return n}function y(t,e){var n=void 0,r=void 0,i=void 0,o=void 0,a=void 0,u=void 0,s=void 0,l=void 0,c=void 0;for(n=0,o=t.length;o>n;n++){if(s=t[n],!s.length)return!0;for(r=0,a=e.length;a>r;r++){if(l=e[r],!l||!l.length)return!0;for(i=0,u=l.length;u>i&&(c=l[i],c==s[i]);i++)if(i+1===u||i+1===s.length)return!0}}return!1}function b(t,e,n){n=Math.max(0,n),M["default"]["function"](e)&&(e=o(t,e)),M["default"].object(e)&&(e=o(t,function(t){return h(t,e)}));for(var r=arguments.length,i=Array(r>3?r-3:0),a=3;r>a;a++)i[a-3]=arguments[a];return e>=0?t.slice(0,e).concat(i).concat(t.slice(e+n)):t.slice(0,t.length+e).concat(i).concat(t.slice(t.length+e+n))}Object.defineProperty(n,"__esModule",{value:!0});var x=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}();n.arrayFrom=u,n.before=s,n.coercePath=f,n.getIn=d,n.makeError=g,n.solveRelativePath=m,n.solveUpdate=y,n.splice=b;var w=t("./monkey"),k=t("./type"),M=r(k),_=Function.prototype,E=function(){function t(e){i(this,t),this.size=e,this.records=[]}return x(t,[{key:"get",value:function(){return this.records}},{key:"add",value:function(t){return this.records.unshift(t),this.records.length>this.size&&(this.records.length=this.size),this}},{key:"clear",value:function(){return this.records=[],this}},{key:"back",value:function(t){var e=this.records[t-1];return e&&(this.records=this.records.slice(t)),e}}]),t}();n.Archive=E;var C=c.bind(null,!1),S=c.bind(null,!0);n.shallowClone=C,n.deepClone=S;var T="function"==typeof Object.freeze,N=T?p.bind(null,!1):_,O=T?p.bind(null,!0):_;n.freeze=N,n.deepFreeze=O;var A={data:void 0,solvedPath:null,exists:!1},j=v.bind(null,!1),P=v.bind(null,!0);n.shallowMerge=j,n.deepMerge=P;var L=function(){var t=0;return function(){return t++}}();n.uniqid=L}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./monkey":4,"./type":5}],4:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=t("./type"),u=r(a),s=t("./update"),l=r(s),c=t("./helpers"),f=function p(t){var e=this;i(this,p);var n=u["default"].monkeyDefinition(t);if(!n)throw(0,c.makeError)("Baobab.monkey: invalid definition.",{definition:t});if(this.type=n,"object"===this.type)this.getter=t.get,this.projection=t.cursors||{},this.paths=Object.keys(this.projection).map(function(t){return e.projection[t]}),this.options=t.options||{};else{var r=1,o={};u["default"].object(t[t.length-1])&&(r++,o=t[t.length-1]),this.getter=t[t.length-r],this.projection=t.slice(0,-r),this.paths=this.projection,this.options=o}this.paths=this.paths.map(function(t){return[].concat(t)}),this.hasDynamicPaths=this.paths.some(u["default"].dynamicPath)};n.MonkeyDefinition=f;var h=function(){function t(e,n,r){var o=this;i(this,t),this.tree=e,this.path=n,this.definition=r;var a=r.projection,u=c.solveRelativePath.bind(null,n.slice(0,-1));"object"===r.type?(this.projection=Object.keys(a).reduce(function(t,e){return t[e]=u(a[e]),t},{}),this.depPaths=Object.keys(this.projection).map(function(t){return o.projection[t]})):(this.projection=a.map(u),this.depPaths=this.projection),this.state={killed:!1},this.writeListener=function(t){var e=t.data.path;if(!o.state.killed){var n=(0,c.solveUpdate)([e],o.relatedPaths());n&&o.update()}},this.recursiveListener=function(t){var e=t.data,n=e.monkey,r=e.path;if(!o.state.killed&&o!==n){var i=(0,c.solveUpdate)([r],o.relatedPaths(!1));i&&o.update()}},this.tree.on("write",this.writeListener),this.tree.on("_monkey",this.recursiveListener),this.update()}return o(t,[{key:"relatedPaths",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]||arguments[0],n=void 0;n=this.definition.hasDynamicPaths?this.depPaths.map(function(e){return(0,c.getIn)(t.tree._data,e).solvedPath}):this.depPaths;var r=e&&this.depPaths.some(function(e){return!!u["default"].monkeyPath(t.tree._monkeys,e)});return r?n.reduce(function(e,n){var r=u["default"].monkeyPath(t.tree._monkeys,n);if(!r)return e.concat([n]);var i=(0,c.getIn)(t.tree._monkeys,r).data;return e.concat(i.relatedPaths())},[]):n}},{key:"update",value:function(){var t=this.tree.project(this.projection),e=function(t,e,n){var r=null,i=!1;return function(){return i||(r=e.getter.apply(t,"object"===e.type?[n]:n),t.options.immutable&&e.options.immutable!==!1&&(0,c.deepFreeze)(r),i=!0),r}}(this.tree,this.definition,t);if(e.isLazyGetter=!0,this.tree.options.lazyMonkeys)this.tree._data=(0,l["default"])(this.tree._data,this.path,{type:"monkey",value:e},this.tree.options).data;else{var n=(0,l["default"])(this.tree._data,this.path,{type:"set",value:e(),options:{mutableLeaf:!this.definition.options.immutable}},this.tree.options);"data"in n&&(this.tree._data=n.data)}return this.tree.emit("_monkey",{monkey:this,path:this.path}),this}},{key:"release",value:function(){this.tree.off("write",this.writeListener),this.tree.off("_monkey",this.monkeyListener),this.state.killed=!0,delete this.projection,delete this.depPaths,delete this.tree}}]),t}();n.Monkey=h},{"./helpers":3,"./type":5,"./update":6}],5:[function(t,e,n){"use strict";function r(t,e){return e.some(function(e){return o[e](t)})}Object.defineProperty(n,"__esModule",{value:!0});var i=t("./monkey"),o={};o.array=function(t){return Array.isArray(t)},o.object=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&!(t instanceof Date)&&!(t instanceof RegExp)&&!("function"==typeof Map&&t instanceof Map)&&!("function"==typeof Set&&t instanceof Set)},o.string=function(t){return"string"==typeof t},o.number=function(t){return"number"==typeof t},o["function"]=function(t){return"function"==typeof t},o.primitive=function(t){return t!==Object(t)},o.splicer=function(t){return!(!o.array(t)||t.length<2)&&r(t[0],["number","function","object"])&&o.number(t[1])};var a=["string","number","function","object"];o.path=function(t){return!(!t&&0!==t&&""!==t)&&[].concat(t).every(function(t){return r(t,a)})},o.dynamicPath=function(t){return t.some(function(t){return o["function"](t)||o.object(t)})},o.monkeyPath=function(t,e){var n=[],r=t,o=void 0,a=void 0;for(o=0,a=e.length;a>o;o++){if(n.push(e[o]),"object"!=typeof r)return null;if(r=r[e[o]],r instanceof i.Monkey)return n}return null},o.lazyGetter=function(t,e){var n=Object.getOwnPropertyDescriptor(t,e);return n&&n.get&&n.get.isLazyGetter===!0},o.monkeyDefinition=function(t){if(o.object(t))return o["function"](t.get)&&(!t.cursors||o.object(t.cursors)&&Object.keys(t.cursors).every(function(e){return o.path(t.cursors[e])}))?"object":null;if(o.array(t)){var e=1;return o.object(t[t.length-1])&&e++,o["function"](t[t.length-e])&&t.slice(0,-e).every(function(t){return o.path(t)})?"array":null}return null},o.watcherMapping=function(t){return o.object(t)&&Object.keys(t).every(function(e){return o.path(t[e])})};var u=["set","apply","push","unshift","concat","pop","shift","deepMerge","merge","splice","unset"];o.operationType=function(t){return"string"==typeof t&&!!~u.indexOf(t)},n["default"]=o,e.exports=n["default"]},{"./monkey":4}],6:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}function o(t,e,n){return(0,l.makeError)('Baobab.update: cannot apply the "'+t+'" on '+("a non "+e+" (path: /"+n.join("/")+")."),{path:n})}function a(t,e,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],a=n.type,u=n.value,c=n.options,f=void 0===c?{}:c,h={root:t},p=["root"].concat(i(e)),d=[],g=h,v=void 0,m=void 0,y=void 0;for(v=0,m=p.length;m>v;v++){if(y=p[v],v>0&&d.push(y),v===m-1){if("set"===a){if(r.pure&&g[y]===u)return{node:g[y]};s["default"].lazyGetter(g,y)?Object.defineProperty(g,y,{value:u,enumerable:!0,configurable:!0}):r.persistent&&!f.mutableLeaf?g[y]=(0,l.shallowClone)(u):g[y]=u}else if("monkey"===a)Object.defineProperty(g,y,{get:u,enumerable:!0,configurable:!0});else if("apply"===a){var b=u(g[y]);if(r.pure&&g[y]===b)return{node:g[y]};s["default"].lazyGetter(g,y)?Object.defineProperty(g,y,{value:b,enumerable:!0,configurable:!0}):r.persistent?g[y]=(0,l.shallowClone)(b):g[y]=b}else if("push"===a){if(!s["default"].array(g[y]))throw o("push","array",d);r.persistent?g[y]=g[y].concat([u]):g[y].push(u)}else if("unshift"===a){if(!s["default"].array(g[y]))throw o("unshift","array",d);r.persistent?g[y]=[u].concat(g[y]):g[y].unshift(u)}else if("concat"===a){if(!s["default"].array(g[y]))throw o("concat","array",d);r.persistent?g[y]=g[y].concat(u):g[y].push.apply(g[y],u)}else if("splice"===a){if(!s["default"].array(g[y]))throw o("splice","array",d);r.persistent?g[y]=l.splice.apply(null,[g[y]].concat(u)):g[y].splice.apply(g[y],u)}else if("pop"===a){if(!s["default"].array(g[y]))throw o("pop","array",d);r.persistent?g[y]=(0,l.splice)(g[y],-1,1):g[y].pop()}else if("shift"===a){if(!s["default"].array(g[y]))throw o("shift","array",d);r.persistent?g[y]=(0,l.splice)(g[y],0,1):g[y].shift()}else if("unset"===a)s["default"].object(g)?delete g[y]:s["default"].array(g)&&g.splice(y,1);else if("merge"===a){if(!s["default"].object(g[y]))throw o("merge","object",d);r.persistent?g[y]=(0,l.shallowMerge)({},g[y],u):g[y]=(0,l.shallowMerge)(g[y],u)}else if("deepMerge"===a){if(!s["default"].object(g[y]))throw o("deepMerge","object",d);r.persistent?g[y]=(0,l.deepMerge)({},g[y],u):g[y]=(0,l.deepMerge)(g[y],u)}r.immutable&&!f.mutableLeaf&&(0,l.deepFreeze)(g);break}s["default"].primitive(g[y])?g[y]={}:r.persistent&&(g[y]=(0,l.shallowClone)(g[y])),r.immutable&&m>0&&(0,l.freeze)(g),g=g[y]}return s["default"].lazyGetter(g,y)?{data:h.root}:{data:h.root,node:g[y]}}Object.defineProperty(n,"__esModule",{value:!0}),n["default"]=a;var u=t("./type"),s=r(u),l=t("./helpers");e.exports=n["default"]},{"./helpers":3,"./type":5}],7:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function(t,e,n){for(var r=!0;r;){var i=t,o=e,a=n;r=!1,null===i&&(i=Function.prototype);var u=Object.getOwnPropertyDescriptor(i,o);if(void 0!==u){if("value"in u)return u.value;var s=u.get;if(void 0===s)return;return s.call(a)}var l=Object.getPrototypeOf(i);if(null===l)return;t=l,e=o,n=a,r=!0,u=l=void 0}},s=t("emmett"),l=r(s),c=t("./cursor"),f=r(c),h=t("./type"),p=r(h),d=t("./helpers"),g=function(t){function e(t,n){var r=this;i(this,e),u(Object.getPrototypeOf(e.prototype),"constructor",this).call(this),this.tree=t,this.mapping=null,this.state={killed:!1},this.refresh(n),this.handler=function(t){if(!r.state.killed){var e=r.getWatchedPaths();return(0,d.solveUpdate)(t.data.paths,e)?r.emit("update"):void 0}},this.tree.on("update",this.handler)}return o(e,t),a(e,[{key:"getWatchedPaths",value:function(){var t=this,e=Object.keys(this.mapping).map(function(e){var n=t.mapping[e];return n instanceof f["default"]?n.solvedPath:t.mapping[e]});return e.reduce(function(e,n){if(n=[].concat(n),p["default"].dynamicPath(n)&&(n=(0,d.getIn)(t.tree._data,n).solvedPath),!n)return e;var r=p["default"].monkeyPath(t.tree._monkeys,n);return r?e.concat((0,d.getIn)(t.tree._monkeys,r).data.relatedPaths()):e.concat([n])},[])}},{key:"getCursors",value:function(){var t=this,e={};return Object.keys(this.mapping).forEach(function(n){var r=t.mapping[n];r instanceof f["default"]?e[n]=r:e[n]=t.tree.select(r)}),e}},{key:"refresh",value:function(t){if(!p["default"].watcherMapping(t))throw(0,d.makeError)("Baobab.watch: invalid mapping.",{mapping:t});this.mapping=t;var e={};for(var n in t)e[n]=t[n]instanceof f["default"]?t[n].path:t[n];this.get=this.tree.project.bind(this.tree,e)}},{key:"release",value:function(){this.tree.off("update",this.handler),this.state.killed=!0,this.kill()}}]),e}(l["default"]);n["default"]=g,e.exports=n["default"]},{"./cursor":2,"./helpers":3,"./type":5,emmett:9}],8:[function(e,n,r){!function(){function e(t){return t&&(t.ownerDocument||t.document||t).documentElement}function r(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function i(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function o(t){return null===t?NaN:+t}function a(t){return!isNaN(t)}function u(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}function s(t){return t.length}function l(t){for(var e=1;t*e%1;)e*=10;return e}function c(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function f(){this._=Object.create(null)}function h(t){return(t+="")===Ma||t[0]===_a?_a+t:t}function p(t){return(t+="")[0]===_a?t.slice(1):t}function d(t){return h(t)in this._}function g(t){return(t=h(t))in this._&&delete this._[t]}function v(){var t=[];for(var e in this._)t.push(p(e));return t}function m(){var t=0;for(var e in this._)++t;return t}function y(){for(var t in this._)return!1;return!0}function b(){this._=Object.create(null)}function x(t){return t}function w(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function k(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=Ea.length;r>n;++n){var i=Ea[n]+e;if(i in t)return i}}function M(){}function _(){}function E(t){function e(){for(var e,r=n,i=-1,o=r.length;++i<o;)(e=r[i].on)&&e.apply(this,arguments);return t}var n=[],r=new f;return e.on=function(e,i){var o,a=r.get(e);return arguments.length<2?a&&a.on:(a&&(a.on=null,n=n.slice(0,o=n.indexOf(a)).concat(n.slice(o+1)),r.remove(e)),i&&n.push(r.set(e,{on:i})),t)},e}function C(){ca.event.preventDefault()}function S(){for(var t,e=ca.event;t=e.sourceEvent;)e=t;return e}function T(t){for(var e=new _,n=0,r=arguments.length;++n<r;)e[arguments[n]]=E(e);return e.of=function(n,r){return function(i){try{var o=i.sourceEvent=ca.event;i.target=t,ca.event=i,e[i.type].apply(n,r)}finally{ca.event=o}}},e}function N(t){return Sa(t,Aa),t}function O(t){return"function"==typeof t?t:function(){return Ta(t,this)}}function A(t){return"function"==typeof t?t:function(){return Na(t,this)}}function j(t,e){function n(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function i(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function a(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}function u(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}return t=ca.ns.qualify(t),null==e?t.local?r:n:"function"==typeof e?t.local?u:a:t.local?o:i}function P(t){return t.trim().replace(/\s+/g," ")}function L(t){return new RegExp("(?:^|\\s+)"+ca.requote(t)+"(?:\\s+|$)","g")}function D(t){return(t+"").trim().split(/^|\s+/)}function R(t,e){function n(){for(var n=-1;++n<i;)t[n](this,e)}function r(){for(var n=-1,r=e.apply(this,arguments);++n<i;)t[n](this,r)}t=D(t).map(I);var i=t.length;return"function"==typeof e?r:n}function I(t){var e=L(t);return function(n,r){if(i=n.classList)return r?i.add(t):i.remove(t);var i=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(i)||n.setAttribute("class",P(i+" "+t))):n.setAttribute("class",P(i.replace(e," ")))}}function q(t,e,n){function r(){this.style.removeProperty(t)}function i(){this.style.setProperty(t,e,n)}function o(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}return null==e?r:"function"==typeof e?o:i}function F(t,e){function n(){delete this[t]}function r(){this[t]=e}function i(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}return null==e?n:"function"==typeof e?i:r}function B(t){function e(){var e=this.ownerDocument,n=this.namespaceURI;return n===ja&&e.documentElement.namespaceURI===ja?e.createElement(t):e.createElementNS(n,t)}function n(){return this.ownerDocument.createElementNS(t.space,t.local)}return"function"==typeof t?t:(t=ca.ns.qualify(t)).local?n:e}function z(){var t=this.parentNode;t&&t.removeChild(this)}function H(t){return{__data__:t}}function W(t){return function(){return Oa(this,t)}}function U(t){return arguments.length||(t=i),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}function $(t,e){for(var n=0,r=t.length;r>n;n++)for(var i,o=t[n],a=0,u=o.length;u>a;a++)(i=o[a])&&e(i,a,n);return t}function V(t){return Sa(t,La),t}function X(t){var e,n;return function(r,i,o){var a,u=t[o].update,s=u.length;for(o!=n&&(n=o,e=0),i>=e&&(e=i+1);!(a=u[e])&&++e<s;);return a}}function Y(t,e,n){function r(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}function i(){var i=s(e,ha(arguments));r.call(this),this.addEventListener(t,this[a]=i,i.$=n),i._=e}function o(){var e,n=new RegExp("^__on([^.]+)"+ca.requote(t)+"$");for(var r in this)if(e=r.match(n)){var i=this[r];this.removeEventListener(e[1],i,i.$),delete this[r]}}var a="__on"+t,u=t.indexOf("."),s=G;u>0&&(t=t.slice(0,u));var l=Da.get(t);return l&&(t=l,s=Z),u?e?i:r:e?M:o}function G(t,e){return function(n){var r=ca.event;ca.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{ca.event=r}}}function Z(t,e){var n=G(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function Q(t){var n=".dragsuppress-"+ ++Ia,i="click"+n,o=ca.select(r(t)).on("touchmove"+n,C).on("dragstart"+n,C).on("selectstart"+n,C);if(null==Ra&&(Ra=!("onselectstart"in t)&&k(t.style,"userSelect")),Ra){var a=e(t).style,u=a[Ra];a[Ra]="none"}return function(t){if(o.on(n,null),Ra&&(a[Ra]=u),t){var e=function(){o.on(i,null)};o.on(i,function(){C(),e()},!0),setTimeout(e,0)}}}function K(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();if(0>qa){var o=r(t);if(o.scrollX||o.scrollY){n=ca.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var a=n[0][0].getScreenCTM();qa=!(a.f||a.e),n.remove()}}return qa?(i.x=e.pageX,i.y=e.pageY):(i.x=e.clientX,i.y=e.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var u=t.getBoundingClientRect();return[e.clientX-u.left-t.clientLeft,e.clientY-u.top-t.clientTop]}function J(){return ca.event.changedTouches[0].identifier}function tt(t){return t>0?1:0>t?-1:0}function et(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function nt(t){return t>1?0:-1>t?za:Math.acos(t)}function rt(t){return t>1?Ua:-1>t?-Ua:Math.asin(t)}function it(t){return((t=Math.exp(t))-1/t)/2}function ot(t){return((t=Math.exp(t))+1/t)/2}function at(t){return((t=Math.exp(2*t))-1)/(t+1)}function ut(t){return(t=Math.sin(t/2))*t}function st(){}function lt(t,e,n){return this instanceof lt?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof lt?new lt(t.h,t.s,t.l):Mt(""+t,_t,lt):new lt(t,e,n)}function ct(t,e,n){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?o+(a-o)*t/60:180>t?a:240>t?o+(a-o)*(240-t)/60:o}function i(t){return Math.round(255*r(t))}var o,a;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,a=.5>=n?n*(1+e):n+e-n*e,o=2*n-a,new bt(i(t+120),i(t),i(t-120))}function ft(t,e,n){return this instanceof ft?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ft?new ft(t.h,t.c,t.l):t instanceof pt?gt(t.l,t.a,t.b):gt((t=Et((t=ca.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ft(t,e,n)}function ht(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new pt(n,Math.cos(t*=$a)*e,Math.sin(t)*e)}function pt(t,e,n){return this instanceof pt?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof pt?new pt(t.l,t.a,t.b):t instanceof ft?ht(t.h,t.c,t.l):Et((t=bt(t)).r,t.g,t.b):new pt(t,e,n)}function dt(t,e,n){var r=(t+16)/116,i=r+e/500,o=r-n/200;return i=vt(i)*nu,r=vt(r)*ru,o=vt(o)*iu,new bt(yt(3.2404542*i-1.5371385*r-.4985314*o),yt(-.969266*i+1.8760108*r+.041556*o),yt(.0556434*i-.2040259*r+1.0572252*o))}function gt(t,e,n){return t>0?new ft(Math.atan2(n,e)*Va,Math.sqrt(e*e+n*n),t):new ft(NaN,NaN,t)}function vt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function mt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function yt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function bt(t,e,n){return this instanceof bt?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof bt?new bt(t.r,t.g,t.b):Mt(""+t,bt,ct):new bt(t,e,n)}function xt(t){return new bt(t>>16,t>>8&255,255&t)}function wt(t){return xt(t)+""}function kt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Mt(t,e,n){var r,i,o,a=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);
case"rgb":return e(St(i[0]),St(i[1]),St(i[2]))}return(o=uu.get(t))?e(o.r,o.g,o.b):(null==t||"#"!==t.charAt(0)||isNaN(o=parseInt(t.slice(1),16))||(4===t.length?(a=(3840&o)>>4,a=a>>4|a,u=240&o,u=u>>4|u,s=15&o,s=s<<4|s):7===t.length&&(a=(16711680&o)>>16,u=(65280&o)>>8,s=255&o)),e(a,u,s))}function _t(t,e,n){var r,i,o=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),u=a-o,s=(a+o)/2;return u?(i=.5>s?u/(a+o):u/(2-a-o),r=t==a?(e-n)/u+(n>e?6:0):e==a?(n-t)/u+2:(t-e)/u+4,r*=60):(r=NaN,i=s>0&&1>s?0:r),new lt(r,i,s)}function Et(t,e,n){t=Ct(t),e=Ct(e),n=Ct(n);var r=mt((.4124564*t+.3575761*e+.1804375*n)/nu),i=mt((.2126729*t+.7151522*e+.072175*n)/ru),o=mt((.0193339*t+.119192*e+.9503041*n)/iu);return pt(116*i-16,500*(r-i),200*(i-o))}function Ct(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function St(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function Tt(t){return"function"==typeof t?t:function(){return t}}function Nt(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Ot(e,n,t,r)}}function Ot(t,e,n,r){function i(){var t,e=s.status;if(!e&&jt(s)||e>=200&&300>e||304===e){try{t=n.call(o,s)}catch(r){return void a.error.call(o,r)}a.load.call(o,t)}else a.error.call(o,s)}var o={},a=ca.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,l=null;return!this.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var e=ca.event;ca.event=t;try{a.progress.call(o,s)}finally{ca.event=e}},o.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",o)},o.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",o):e},o.responseType=function(t){return arguments.length?(l=t,o):l},o.response=function(t){return n=t,o},["get","post"].forEach(function(t){o[t]=function(){return o.send.apply(o,[t].concat(ha(arguments)))}}),o.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),s.setRequestHeader)for(var c in u)s.setRequestHeader(c,u[c]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=l&&(s.responseType=l),null!=i&&o.on("error",i).on("load",function(t){i(null,t)}),a.beforesend.call(o,s),s.send(null==r?null:r),o},o.abort=function(){return s.abort(),o},ca.rebind(o,a,"on"),null==r?o:o.get(At(r))}function At(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function jt(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Pt(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i=n+e,o={c:t,t:i,n:null};return lu?lu.n=o:su=o,lu=o,cu||(fu=clearTimeout(fu),cu=1,hu(Lt)),o}function Lt(){var t=Dt(),e=Rt()-t;e>24?(isFinite(e)&&(clearTimeout(fu),fu=setTimeout(Lt,e)),cu=0):(cu=1,hu(Lt))}function Dt(){for(var t=Date.now(),e=su;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function Rt(){for(var t,e=su,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:su=e.n;return lu=t,n}function It(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}function qt(t,e){var n=Math.pow(10,3*ka(8-e));return{scale:e>8?function(t){return t/n}:function(t){return t*n},symbol:t}}function Ft(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,o=r&&n?function(t,e){for(var i=t.length,o=[],a=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>e&&(u=Math.max(1,e-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=r[a=(a+1)%r.length];return o.reverse().join(n)}:x;return function(t){var n=du.exec(t),r=n[1]||" ",a=n[2]||">",u=n[3]||"-",s=n[4]||"",l=n[5],c=+n[6],f=n[7],h=n[8],p=n[9],d=1,g="",v="",m=!1,y=!0;switch(h&&(h=+h.substring(1)),(l||"0"===r&&"="===a)&&(l=r="0",a="="),p){case"n":f=!0,p="g";break;case"%":d=100,v="%",p="f";break;case"p":d=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+p.toLowerCase());case"c":y=!1;case"d":m=!0,h=0;break;case"s":d=-1,p="r"}"$"===s&&(g=i[0],v=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=gu.get(p)||Bt;var b=l&&f;return function(t){var n=v;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>d){var s=ca.formatPrefix(t,h);t=s.scale(t),n=s.symbol+v}else t*=d;t=p(t,h);var x,w,k=t.lastIndexOf(".");if(0>k){var M=y?t.lastIndexOf("e"):-1;0>M?(x=t,w=""):(x=t.substring(0,M),w=t.substring(M))}else x=t.substring(0,k),w=e+t.substring(k+1);!l&&f&&(x=o(x,1/0));var _=g.length+x.length+w.length+(b?0:i.length),E=c>_?new Array(_=c-_+1).join(r):"";return b&&(x=o(E+x,E.length?c-w.length:1/0)),i+=g,t=x+w,("<"===a?i+t+E:">"===a?E+i+t:"^"===a?E.substring(0,_>>=1)+i+t+E.substring(_):i+(b?t:E+t))+n}}}function Bt(t){return t+""}function zt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(t,e,n){function r(e){var n=t(e),r=o(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new mu(n-1)),1),n}function o(t,n){return e(t=new mu(+t),n),t}function a(t,r,o){var a=i(t),u=[];if(o>1)for(;r>a;)n(a)%o||u.push(new Date(+a)),e(a,1);else for(;r>a;)u.push(new Date(+a)),e(a,1);return u}function u(t,e,n){try{mu=zt;var r=new zt;return r._=t,a(r,e,n)}finally{mu=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=o,t.range=a;var s=t.utc=Wt(t);return s.floor=s,s.round=Wt(r),s.ceil=Wt(i),s.offset=Wt(o),s.range=u,t}function Wt(t){return function(e,n){try{mu=zt;var r=new zt;return r._=e,t(r,n)._}finally{mu=Date}}}function Ut(t){function e(t){function e(e){for(var n,i,o,a=[],u=-1,s=0;++u<r;)37===t.charCodeAt(u)&&(a.push(t.slice(s,u)),null!=(i=bu[n=t.charAt(++u)])&&(n=t.charAt(++u)),(o=T[n])&&(n=o(e,null==i?"e"===n?" ":"0":i)),a.push(n),s=u+1);return a.push(t.slice(s,u)),a.join("")}var r=t.length;return e.parse=function(e){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},i=n(r,t,e,0);if(i!=e.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&mu!==zt,a=new(o?zt:mu);return"j"in r?a.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),a.setFullYear(r.y,0,1),a.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(a.getDay()+5)%7:r.w+7*r.U-(a.getDay()+6)%7)):a.setFullYear(r.y,r.m,r.d),a.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),o?a._:a},e.toString=function(){return t},e}function n(t,e,n,r){for(var i,o,a,u=0,s=e.length,l=n.length;s>u;){if(r>=l)return-1;if(i=e.charCodeAt(u++),37===i){if(a=e.charAt(u++),o=N[a in bu?e.charAt(u++):a],!o||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){k.lastIndex=0;var r=k.exec(e.slice(n));return r?(t.w=M.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){x.lastIndex=0;var r=x.exec(e.slice(n));return r?(t.w=w.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){C.lastIndex=0;var r=C.exec(e.slice(n));return r?(t.m=S.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.m=E.get(r[0].toLowerCase()),n+r[0].length):-1}function u(t,e,r){return n(t,T.c.toString(),e,r)}function s(t,e,r){return n(t,T.x.toString(),e,r)}function l(t,e,r){return n(t,T.X.toString(),e,r)}function c(t,e,n){var r=b.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var f=t.dateTime,h=t.date,p=t.time,d=t.periods,g=t.days,v=t.shortDays,m=t.months,y=t.shortMonths;e.utc=function(t){function n(t){try{mu=zt;var e=new mu;return e._=t,r(e)}finally{mu=Date}}var r=e(t);return n.parse=function(t){try{mu=zt;var e=r.parse(t);return e&&e._}finally{mu=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=ce;var b=ca.map(),x=Vt(g),w=Xt(g),k=Vt(v),M=Xt(v),_=Vt(m),E=Xt(m),C=Vt(y),S=Xt(y);d.forEach(function(t,e){b.set(t.toLowerCase(),e)});var T={a:function(t){return v[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(f),d:function(t,e){return $t(t.getDate(),e,2)},e:function(t,e){return $t(t.getDate(),e,2)},H:function(t,e){return $t(t.getHours(),e,2)},I:function(t,e){return $t(t.getHours()%12||12,e,2)},j:function(t,e){return $t(1+vu.dayOfYear(t),e,3)},L:function(t,e){return $t(t.getMilliseconds(),e,3)},m:function(t,e){return $t(t.getMonth()+1,e,2)},M:function(t,e){return $t(t.getMinutes(),e,2)},p:function(t){return d[+(t.getHours()>=12)]},S:function(t,e){return $t(t.getSeconds(),e,2)},U:function(t,e){return $t(vu.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return $t(vu.mondayOfYear(t),e,2)},x:e(h),X:e(p),y:function(t,e){return $t(t.getFullYear()%100,e,2)},Y:function(t,e){return $t(t.getFullYear()%1e4,e,4)},Z:se,"%":function(){return"%"}},N={a:r,A:i,b:o,B:a,c:u,d:ne,e:ne,H:ie,I:ie,j:re,L:ue,m:ee,M:oe,p:c,S:ae,U:Gt,w:Yt,W:Zt,x:s,X:l,y:Kt,Y:Qt,Z:Jt,"%":le};return e}function $t(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",o=i.length;return r+(n>o?new Array(n-o+1).join(e)+i:i)}function Vt(t){return new RegExp("^(?:"+t.map(ca.requote).join("|")+")","i")}function Xt(t){for(var e=new f,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Yt(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Gt(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function Zt(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function Qt(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Kt(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+2));return r?(t.y=te(+r[0]),n+r[0].length):-1}function Jt(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function te(t){return t+(t>68?1900:2e3)}function ee(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ne(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function re(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function ie(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function oe(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ae(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ue(t,e,n){xu.lastIndex=0;var r=xu.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function se(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=ka(e)/60|0,i=ka(e)%60;return n+$t(r,"0",2)+$t(i,"0",2)}function le(t,e,n){wu.lastIndex=0;var r=wu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ce(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(e){for(var n=0,r=t[n];!r[1](e);)r=t[++n];return r[0](e)}}function fe(){}function he(t,e,n){var r=n.s=t+e,i=r-t,o=r-i;n.t=t-o+(e-i)}function pe(t,e){t&&Eu.hasOwnProperty(t.type)&&Eu[t.type](t,e)}function de(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function ge(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)de(t[n],e,1);e.polygonEnd()}function ve(){function t(t,e){t*=$a,e=e*$a/2+za/4;var n=t-r,a=n>=0?1:-1,u=a*n,s=Math.cos(e),l=Math.sin(e),c=o*l,f=i*s+c*Math.cos(u),h=c*a*Math.sin(u);Su.add(Math.atan2(h,f)),r=t,i=s,o=l}var e,n,r,i,o;Tu.point=function(a,u){Tu.point=t,r=(e=a)*$a,i=Math.cos(u=(n=u)*$a/2+za/4),o=Math.sin(u)},Tu.lineEnd=function(){t(e,n)}}function me(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function ye(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function be(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function xe(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function we(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ke(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function Me(t){return[Math.atan2(t[1],t[0]),rt(t[2])]}function _e(t,e){return ka(t[0]-e[0])<Fa&&ka(t[1]-e[1])<Fa}function Ee(t,e){t*=$a;var n=Math.cos(e*=$a);Ce(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Ce(t,e,n){++Nu,Au+=(t-Au)/Nu,ju+=(e-ju)/Nu,Pu+=(n-Pu)/Nu}function Se(){function t(t,i){t*=$a;var o=Math.cos(i*=$a),a=o*Math.cos(t),u=o*Math.sin(t),s=Math.sin(i),l=Math.atan2(Math.sqrt((l=n*s-r*u)*l+(l=r*a-e*s)*l+(l=e*u-n*a)*l),e*a+n*u+r*s);Ou+=l,Lu+=l*(e+(e=a)),Du+=l*(n+(n=u)),Ru+=l*(r+(r=s)),Ce(e,n,r)}var e,n,r;Bu.point=function(i,o){i*=$a;var a=Math.cos(o*=$a);e=a*Math.cos(i),n=a*Math.sin(i),r=Math.sin(o),Bu.point=t,Ce(e,n,r)}}function Te(){Bu.point=Ee}function Ne(){function t(t,e){t*=$a;var n=Math.cos(e*=$a),a=n*Math.cos(t),u=n*Math.sin(t),s=Math.sin(e),l=i*s-o*u,c=o*a-r*s,f=r*u-i*a,h=Math.sqrt(l*l+c*c+f*f),p=r*a+i*u+o*s,d=h&&-nt(p)/h,g=Math.atan2(h,p);Iu+=d*l,qu+=d*c,Fu+=d*f,Ou+=g,Lu+=g*(r+(r=a)),Du+=g*(i+(i=u)),Ru+=g*(o+(o=s)),Ce(r,i,o)}var e,n,r,i,o;Bu.point=function(a,u){e=a,n=u,Bu.point=t,a*=$a;var s=Math.cos(u*=$a);r=s*Math.cos(a),i=s*Math.sin(a),o=Math.sin(u),Ce(r,i,o)},Bu.lineEnd=function(){t(e,n),Bu.lineEnd=Te,Bu.point=Ee}}function Oe(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return n=e.invert(n,r),n&&t.invert(n[0],n[1])}),n}function Ae(){return!0}function je(t,e,n,r,i){var o=[],a=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,n=t[0],r=t[e];if(_e(n,r)){i.lineStart();for(var u=0;e>u;++u)i.point((n=t[u])[0],n[1]);return void i.lineEnd()}var s=new Le(n,t,null,!0),l=new Le(n,null,s,!1);s.o=l,o.push(s),a.push(l),s=new Le(r,t,null,!1),l=new Le(r,null,s,!0),s.o=l,o.push(s),a.push(l)}}),a.sort(e),Pe(o),Pe(a),o.length){for(var u=0,s=n,l=a.length;l>u;++u)a[u].e=s=!s;for(var c,f,h=o[0];;){for(var p=h,d=!0;p.v;)if((p=p.n)===h)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(d)for(var u=0,l=c.length;l>u;++u)i.point((f=c[u])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(d){c=p.p.z;for(var u=c.length-1;u>=0;--u)i.point((f=c[u])[0],f[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,c=p.z,d=!d}while(!p.v);i.lineEnd()}}}function Pe(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}function Le(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function De(t,e,n,r){return function(i,o){function a(e,n){var r=i(e,n);t(e=r[0],n=r[1])&&o.point(e,n)}function u(t,e){var n=i(t,e);v.point(n[0],n[1])}function s(){y.point=u,v.lineStart()}function l(){y.point=a,v.lineEnd()}function c(t,e){g.push([t,e]);var n=i(t,e);x.point(n[0],n[1])}function f(){x.lineStart(),g=[]}function h(){c(g[0][0],g[0][1]),x.lineEnd();var t,e=x.clean(),n=b.buffer(),r=n.length;if(g.pop(),d.push(g),g=null,r)if(1&e){t=n[0];var i,r=t.length-1,a=-1;if(r>0){for(w||(o.polygonStart(),w=!0),o.lineStart();++a<r;)o.point((i=t[a])[0],i[1]);o.lineEnd()}}else r>1&&2&e&&n.push(n.pop().concat(n.shift())),p.push(n.filter(Re))}var p,d,g,v=e(o),m=i.invert(r[0],r[1]),y={point:a,lineStart:s,lineEnd:l,polygonStart:function(){y.point=c,y.lineStart=f,y.lineEnd=h,p=[],d=[]},polygonEnd:function(){y.point=a,y.lineStart=s,y.lineEnd=l,p=ca.merge(p);var t=He(m,d);p.length?(w||(o.polygonStart(),w=!0),je(p,qe,t,n,o)):t&&(w||(o.polygonStart(),w=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),w&&(o.polygonEnd(),w=!1),p=d=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}},b=Ie(),x=e(b),w=!1;return y}}function Re(t){return t.length>1}function Ie(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:M,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function qe(t,e){return((t=t.x)[0]<0?t[1]-Ua-Fa:Ua-t[1])-((e=e.x)[0]<0?e[1]-Ua-Fa:Ua-e[1])}function Fe(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var u=o>0?za:-za,s=ka(o-n);ka(s-za)<Fa?(t.point(n,r=(r+a)/2>0?Ua:-Ua),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),e=0):i!==u&&s>=za&&(ka(n-i)<Fa&&(n-=i*Fa),ka(o-u)<Fa&&(o-=u*Fa),r=Be(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),e=0),t.point(n=o,r=a),i=u},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}function Be(t,e,n,r){var i,o,a=Math.sin(t-n);return ka(a)>Fa?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*o*a)):(e+r)/2}function ze(t,e,n,r){var i;if(null==t)i=n*Ua,r.point(-za,i),r.point(0,i),r.point(za,i),r.point(za,0),r.point(za,-i),r.point(0,-i),r.point(-za,-i),r.point(-za,0),r.point(-za,i);else if(ka(t[0]-e[0])>Fa){var o=t[0]<e[0]?za:-za;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}function He(t,e){var n=t[0],r=t[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Su.reset();for(var u=0,s=e.length;s>u;++u){var l=e[u],c=l.length;if(c)for(var f=l[0],h=f[0],p=f[1]/2+za/4,d=Math.sin(p),g=Math.cos(p),v=1;;){v===c&&(v=0),t=l[v];var m=t[0],y=t[1]/2+za/4,b=Math.sin(y),x=Math.cos(y),w=m-h,k=w>=0?1:-1,M=k*w,_=M>za,E=d*b;if(Su.add(Math.atan2(E*k*Math.sin(M),g*x+E*Math.cos(M))),o+=_?w+k*Ha:w,_^h>=n^m>=n){var C=be(me(f),me(t));ke(C);var S=be(i,C);ke(S);var T=(_^w>=0?-1:1)*rt(S[2]);(r>T||r===T&&(C[0]||C[1]))&&(a+=_^w>=0?1:-1)}if(!v++)break;h=m,d=b,g=x,f=t}}return(-Fa>o||Fa>o&&-Fa>Su)^1&a}function We(t){function e(t,e){return Math.cos(t)*Math.cos(e)>o}function n(t){var n,o,s,l,c;return{lineStart:function(){l=s=!1,c=1},point:function(f,h){var p,d=[f,h],g=e(f,h),v=a?g?0:i(f,h):g?i(f+(0>f?za:-za),h):0;if(!n&&(l=s=g)&&t.lineStart(),g!==s&&(p=r(n,d),(_e(n,p)||_e(d,p))&&(d[0]+=Fa,d[1]+=Fa,g=e(d[0],d[1]))),g!==s)c=0,g?(t.lineStart(),p=r(d,n),t.point(p[0],p[1])):(p=r(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(u&&n&&a^g){var m;v&o||!(m=r(d,n,!0))||(c=0,a?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&_e(n,d)||t.point(d[0],d[1]),n=d,s=g,o=v},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return c|(l&&s)<<1}}}function r(t,e,n){var r=me(t),i=me(e),a=[1,0,0],u=be(r,i),s=ye(u,u),l=u[0],c=s-l*l;if(!c)return!n&&t;var f=o*s/c,h=-o*l/c,p=be(a,u),d=we(a,f),g=we(u,h);xe(d,g);var v=p,m=ye(d,v),y=ye(v,v),b=m*m-y*(ye(d,d)-1);if(!(0>b)){var x=Math.sqrt(b),w=we(v,(-m-x)/y);if(xe(w,d),w=Me(w),!n)return w;var k,M=t[0],_=e[0],E=t[1],C=e[1];M>_&&(k=M,M=_,_=k);var S=_-M,T=ka(S-za)<Fa,N=T||Fa>S;if(!T&&E>C&&(k=E,E=C,C=k),N?T?E+C>0^w[1]<(ka(w[0]-M)<Fa?E:C):E<=w[1]&&w[1]<=C:S>za^(M<=w[0]&&w[0]<=_)){var O=we(v,(-m+x)/y);return xe(O,d),[w,Me(O)]}}}function i(e,n){var r=a?t:za-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var o=Math.cos(t),a=o>0,u=ka(o)>Fa,s=mn(t,6*$a);return De(e,n,s,a?[0,-t]:[-za,t-za])}function Ue(t,e,n,r){return function(i){var o,a=i.a,u=i.b,s=a.x,l=a.y,c=u.x,f=u.y,h=0,p=1,d=c-s,g=f-l;if(o=t-s,d||!(o>0)){if(o/=d,0>d){if(h>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=n-s,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>h&&(h=o)}else if(d>0){if(h>o)return;p>o&&(p=o)}if(o=e-l,g||!(o>0)){if(o/=g,0>g){if(h>o)return;p>o&&(p=o)}else if(g>0){if(o>p)return;o>h&&(h=o)}if(o=r-l,g||!(0>o)){if(o/=g,0>g){if(o>p)return;o>h&&(h=o)}else if(g>0){if(h>o)return;p>o&&(p=o)}return h>0&&(i.a={x:s+h*d,y:l+h*g}),1>p&&(i.b={x:s+p*d,y:l+p*g}),i}}}}}}function $e(t,e,n,r){function i(r,i){return ka(r[0]-t)<Fa?i>0?0:3:ka(r[0]-n)<Fa?i>0?2:1:ka(r[1]-e)<Fa?i>0?1:0:i>0?3:2}function o(t,e){return a(t.x,e.x)}function a(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(u){function s(t){for(var e=0,n=v.length,r=t[1],i=0;n>i;++i)for(var o,a=1,u=v[i],s=u.length,l=u[0];s>a;++a)o=u[a],l[1]<=r?o[1]>r&&et(l,o,t)>0&&++e:o[1]<=r&&et(l,o,t)<0&&--e,l=o;return 0!==e}function l(o,u,s,l){var c=0,f=0;if(null==o||(c=i(o,s))!==(f=i(u,s))||a(o,u)<0^s>0){do l.point(0===c||3===c?t:n,c>1?r:e);while((c=(c+s+4)%4)!==f)}else l.point(u[0],u[1])}function c(i,o){return i>=t&&n>=i&&o>=e&&r>=o}function f(t,e){c(t,e)&&u.point(t,e)}function h(){N.point=d,v&&v.push(m=[]),_=!0,M=!1,w=k=NaN}function p(){g&&(d(y,b),x&&M&&S.rejoin(),g.push(S.buffer())),N.point=f,M&&u.lineEnd()}function d(t,e){t=Math.max(-Hu,Math.min(Hu,t)),e=Math.max(-Hu,Math.min(Hu,e));var n=c(t,e);if(v&&m.push([t,e]),_)y=t,b=e,x=n,_=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&M)u.point(t,e);else{var r={a:{x:w,y:k},b:{x:t,y:e}};T(r)?(M||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),E=!1):n&&(u.lineStart(),u.point(t,e),E=!1)}w=t,k=e,M=n}var g,v,m,y,b,x,w,k,M,_,E,C=u,S=Ie(),T=Ue(t,e,n,r),N={point:f,lineStart:h,lineEnd:p,polygonStart:function(){u=S,g=[],v=[],E=!0},polygonEnd:function(){u=C,g=ca.merge(g);var e=s([t,r]),n=E&&e,i=g.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),l(null,null,1,u),u.lineEnd()),i&&je(g,o,e,l,u),u.polygonEnd()),g=v=m=null}};return N}}function Ve(t){var e=0,n=za/3,r=ln(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*za/180,n=t[1]*za/180):[e/za*180,n/za*180]},i}function Xe(t,e){function n(t,e){var n=Math.sqrt(o-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),a-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,o=1+r*(2*i-r),a=Math.sqrt(o)/i;return n.invert=function(t,e){var n=a-e;return[Math.atan2(t,n)/i,rt((o-(t*t+n*n)*i*i)/(2*i))]},n}function Ye(){function t(t,e){Uu+=i*t-r*e,r=t,i=e}var e,n,r,i;Gu.point=function(o,a){Gu.point=t,e=r=o,n=i=a},Gu.lineEnd=function(){t(e,n)}}function Ge(t,e){$u>t&&($u=t),t>Xu&&(Xu=t),Vu>e&&(Vu=e),e>Yu&&(Yu=e)}function Ze(){function t(t,e){a.push("M",t,",",e,o)}function e(t,e){a.push("M",t,",",e),u.point=n}function n(t,e){a.push("L",t,",",e)}function r(){u.point=t}function i(){a.push("Z")}var o=Qe(4.5),a=[],u={point:t,lineStart:function(){u.point=e},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return o=Qe(t),u},result:function(){if(a.length){var t=a.join("");return a=[],t}}};return u}function Qe(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Ke(t,e){Au+=t,ju+=e,++Pu}function Je(){function t(t,r){var i=t-e,o=r-n,a=Math.sqrt(i*i+o*o);Lu+=a*(e+t)/2,Du+=a*(n+r)/2,Ru+=a,Ke(e=t,n=r)}var e,n;Qu.point=function(r,i){Qu.point=t,Ke(e=r,n=i)}}function tn(){Qu.point=Ke}function en(){function t(t,e){var n=t-r,o=e-i,a=Math.sqrt(n*n+o*o);Lu+=a*(r+t)/2,Du+=a*(i+e)/2,Ru+=a,a=i*t-r*e,Iu+=a*(r+t),qu+=a*(i+e),Fu+=3*a,Ke(r=t,i=e)}var e,n,r,i;Qu.point=function(o,a){Qu.point=t,Ke(e=r=o,n=i=a)},Qu.lineEnd=function(){t(e,n)}}function nn(t){function e(e,n){t.moveTo(e+a,n),t.arc(e,n,a,0,Ha)}function n(e,n){t.moveTo(e,n),u.point=r}function r(e,n){t.lineTo(e,n)}function i(){u.point=e}function o(){t.closePath()}var a=4.5,u={point:e,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=o},polygonEnd:function(){u.lineEnd=i,u.point=e},pointRadius:function(t){return a=t,u},result:M};return u}function rn(t){function e(t){return(u?r:n)(t)}function n(e){return un(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){b=NaN,_.point=o,e.lineStart()}function o(n,r){var o=me([n,r]),a=t(n,r);i(b,x,y,w,k,M,b=a[0],x=a[1],y=n,w=o[0],k=o[1],M=o[2],u,e),e.point(b,x)}function a(){_.point=n,e.lineEnd()}function s(){r(),_.point=l,_.lineEnd=c}function l(t,e){o(f=t,h=e),p=b,d=x,g=w,v=k,m=M,_.point=o}function c(){i(b,x,y,w,k,M,p,d,f,g,v,m,u,e),_.lineEnd=a,a()}var f,h,p,d,g,v,m,y,b,x,w,k,M,_={point:n,lineStart:r,lineEnd:a,polygonStart:function(){e.polygonStart(),_.lineStart=s},polygonEnd:function(){e.polygonEnd(),_.lineStart=r}};return _}function i(e,n,r,u,s,l,c,f,h,p,d,g,v,m){var y=c-e,b=f-n,x=y*y+b*b;if(x>4*o&&v--){var w=u+p,k=s+d,M=l+g,_=Math.sqrt(w*w+k*k+M*M),E=Math.asin(M/=_),C=ka(ka(M)-1)<Fa||ka(r-h)<Fa?(r+h)/2:Math.atan2(k,w),S=t(C,E),T=S[0],N=S[1],O=T-e,A=N-n,j=b*O-y*A;(j*j/x>o||ka((y*O+b*A)/x-.5)>.3||a>u*p+s*d+l*g)&&(i(e,n,r,u,s,l,T,N,C,w/=_,k/=_,M,v,m),m.point(T,N),i(T,N,C,w,k,M,c,f,h,p,d,g,v,m))}}var o=.5,a=Math.cos(30*$a),u=16;return e.precision=function(t){return arguments.length?(u=(o=t*t)>0&&16,e):Math.sqrt(o)},e}function on(t){var e=rn(function(e,n){return t([e*Va,n*Va])});return function(t){return cn(e(t))}}function an(t){this.stream=t}function un(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function sn(t){return ln(function(){return t})()}function ln(t){function e(t){return t=u(t[0]*$a,t[1]*$a),[t[0]*h+s,l-t[1]*h]}function n(t){return t=u.invert((t[0]-s)/h,(l-t[1])/h),t&&[t[0]*Va,t[1]*Va]}function r(){u=Oe(a=pn(m,y,b),o);var t=o(g,v);return s=p-t[0]*h,l=d+t[1]*h,i()}function i(){return c&&(c.valid=!1,c=null),e}var o,a,u,s,l,c,f=rn(function(t,e){return t=o(t,e),[t[0]*h+s,l-t[1]*h]}),h=150,p=480,d=250,g=0,v=0,m=0,y=0,b=0,w=zu,k=x,M=null,_=null;return e.stream=function(t){return c&&(c.valid=!1),c=cn(w(a,f(k(t)))),c.valid=!0,c},e.clipAngle=function(t){return arguments.length?(w=null==t?(M=t,zu):We((M=+t)*$a),i()):M},e.clipExtent=function(t){return arguments.length?(_=t,k=t?$e(t[0][0],t[0][1],t[1][0],t[1][1]):x,i()):_},e.scale=function(t){return arguments.length?(h=+t,r()):h},e.translate=function(t){return arguments.length?(p=+t[0],d=+t[1],r()):[p,d]},e.center=function(t){return arguments.length?(g=t[0]%360*$a,v=t[1]%360*$a,r()):[g*Va,v*Va]},e.rotate=function(t){return arguments.length?(m=t[0]%360*$a,y=t[1]%360*$a,b=t.length>2?t[2]%360*$a:0,r()):[m*Va,y*Va,b*Va]},ca.rebind(e,f,"precision"),function(){return o=t.apply(this,arguments),e.invert=o.invert&&n,r()}}function cn(t){return un(t,function(e,n){t.point(e*$a,n*$a)})}function fn(t,e){return[t,e]}function hn(t,e){return[t>za?t-Ha:-za>t?t+Ha:t,e]}function pn(t,e,n){return t?e||n?Oe(gn(t),vn(e,n)):gn(t):e||n?vn(e,n):hn}function dn(t){return function(e,n){return e+=t,[e>za?e-Ha:-za>e?e+Ha:e,n]}}function gn(t){var e=dn(t);return e.invert=dn(-t),e}function vn(t,e){function n(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,l=Math.sin(e),c=l*r+u*i;return[Math.atan2(s*o-c*a,u*r-l*i),rt(c*o+s*a)]}var r=Math.cos(t),i=Math.sin(t),o=Math.cos(e),a=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,l=Math.sin(e),c=l*o-s*a;return[Math.atan2(s*o+l*a,u*r+c*i),rt(c*r-u*i)]},n}function mn(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,o,a,u){var s=a*e;null!=i?(i=yn(n,i),o=yn(n,o),(a>0?o>i:i>o)&&(i+=a*Ha)):(i=t+a*Ha,o=t-.5*s);for(var l,c=i;a>0?c>o:o>c;c-=s)u.point((l=Me([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],l[1])}}function yn(t,e){var n=me(e);n[0]-=t,ke(n);var r=nt(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Fa)%(2*Math.PI)}function bn(t,e,n){var r=ca.range(t,e-Fa,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function xn(t,e,n){var r=ca.range(t,e-Fa,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function wn(t){return t.source}function kn(t){return t.target}function Mn(t,e,n,r){var i=Math.cos(e),o=Math.sin(e),a=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),l=i*Math.sin(t),c=a*Math.cos(n),f=a*Math.sin(n),h=2*Math.asin(Math.sqrt(ut(r-e)+i*a*ut(n-t))),p=1/Math.sin(h),d=h?function(t){var e=Math.sin(t*=h)*p,n=Math.sin(h-t)*p,r=n*s+e*c,i=n*l+e*f,a=n*o+e*u;return[Math.atan2(i,r)*Va,Math.atan2(a,Math.sqrt(r*r+i*i))*Va]}:function(){return[t*Va,e*Va]};return d.distance=h,d}function _n(){function t(t,i){var o=Math.sin(i*=$a),a=Math.cos(i),u=ka((t*=$a)-e),s=Math.cos(u);Ku+=Math.atan2(Math.sqrt((u=a*Math.sin(u))*u+(u=r*o-n*a*s)*u),n*o+r*a*s),e=t,n=o,r=a}var e,n,r;Ju.point=function(i,o){e=i*$a,n=Math.sin(o*=$a),r=Math.cos(o),Ju.point=t},Ju.lineEnd=function(){Ju.point=Ju.lineEnd=M}}function En(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),o=t(r*i);return[o*i*Math.sin(e),o*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(t*o,r*a),Math.asin(r&&n*o/r)]},n}function Cn(t,e){function n(t,e){a>0?-Ua+Fa>e&&(e=-Ua+Fa):e>Ua-Fa&&(e=Ua-Fa);var n=a/Math.pow(i(e),o);return[n*Math.sin(o*t),a-n*Math.cos(o*t)]}var r=Math.cos(t),i=function(t){return Math.tan(za/4+t/2)},o=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),a=r*Math.pow(i(t),o)/o;return o?(n.invert=function(t,e){var n=a-e,r=tt(o)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/o,2*Math.atan(Math.pow(a/r,1/o))-Ua]},n):Tn}function Sn(t,e){function n(t,e){var n=o-e;return[n*Math.sin(i*t),o-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),o=r/i+t;return ka(i)<Fa?fn:(n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,o-tt(i)*Math.sqrt(t*t+n*n)]},n)}function Tn(t,e){return[t,Math.log(Math.tan(za/4+e/2))]}function Nn(t){var e,n=sn(t),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var t=r.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.translate=function(){var t=i.apply(n,arguments);return t===n?e?n.clipExtent(null):n:t},n.clipExtent=function(t){var a=o.apply(n,arguments);if(a===n){if(e=null==t){var u=za*r(),s=i();o([[s[0]-u,s[1]-u],[s[0]+u,s[1]+u]])}}else e&&(a=null);return a},n.clipExtent(null)}function On(t,e){return[Math.log(Math.tan(za/4+e/2)),-t]}function An(t){return t[0]}function jn(t){return t[1]}function Pn(t){for(var e=t.length,n=[0,1],r=2,i=2;e>i;i++){for(;r>1&&et(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Ln(t,e){return t[0]-e[0]||t[1]-e[1]}function Dn(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Rn(t,e,n,r){var i=t[0],o=n[0],a=e[0]-i,u=r[0]-o,s=t[1],l=n[1],c=e[1]-s,f=r[1]-l,h=(u*(s-l)-f*(i-o))/(f*a-u*c);return[i+h*a,s+h*c]}function In(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function qn(){or(this),this.edge=this.site=this.circle=null}function Fn(t){var e=fs.pop()||new qn;return e.site=t,e}function Bn(t){Zn(t),ss.remove(t),fs.push(t),or(t)}function zn(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},o=t.P,a=t.N,u=[t];Bn(t);for(var s=o;s.circle&&ka(n-s.circle.x)<Fa&&ka(r-s.circle.cy)<Fa;)o=s.P,u.unshift(s),Bn(s),s=o;u.unshift(s),Zn(s);for(var l=a;l.circle&&ka(n-l.circle.x)<Fa&&ka(r-l.circle.cy)<Fa;)a=l.N,u.push(l),Bn(l),l=a;u.push(l),Zn(l);var c,f=u.length;for(c=1;f>c;++c)l=u[c],s=u[c-1],nr(l.edge,s.site,l.site,i);s=u[0],l=u[f-1],l.edge=tr(s.site,l.site,null,i),Gn(s),Gn(l)}function Hn(t){for(var e,n,r,i,o=t.x,a=t.y,u=ss._;u;)if(r=Wn(u,a)-o,r>Fa)u=u.L;else{if(i=o-Un(u,a),!(i>Fa)){r>-Fa?(e=u.P,n=u):i>-Fa?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}var s=Fn(t);if(ss.insert(e,s),e||n){if(e===n)return Zn(e),n=Fn(e.site),ss.insert(s,n),s.edge=n.edge=tr(e.site,s.site),Gn(e),void Gn(n);if(!n)return void(s.edge=tr(e.site,s.site));Zn(e),Zn(n);var l=e.site,c=l.x,f=l.y,h=t.x-c,p=t.y-f,d=n.site,g=d.x-c,v=d.y-f,m=2*(h*v-p*g),y=h*h+p*p,b=g*g+v*v,x={x:(v*y-p*b)/m+c,y:(h*b-g*y)/m+f};nr(n.edge,l,d,x),s.edge=tr(l,t,null,x),n.edge=tr(t,d,null,x),Gn(e),Gn(n)}}function Wn(t,e){var n=t.site,r=n.x,i=n.y,o=i-e;if(!o)return r;var a=t.P;if(!a)return-(1/0);n=a.site;var u=n.x,s=n.y,l=s-e;if(!l)return u;var c=u-r,f=1/o-1/l,h=c/l;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*l)-s+l/2+i-o/2)))/f+r:(r+u)/2}function Un(t,e){var n=t.N;if(n)return Wn(n,e);var r=t.site;return r.y===e?r.x:1/0}function $n(t){this.site=t,this.edges=[]}function Vn(t){for(var e,n,r,i,o,a,u,s,l,c,f=t[0][0],h=t[1][0],p=t[0][1],d=t[1][1],g=us,v=g.length;v--;)if(o=g[v],o&&o.prepare())for(u=o.edges,s=u.length,a=0;s>a;)c=u[a].end(),r=c.x,i=c.y,l=u[++a%s].start(),e=l.x,n=l.y,(ka(r-e)>Fa||ka(i-n)>Fa)&&(u.splice(a,0,new rr(er(o.site,c,ka(r-f)<Fa&&d-i>Fa?{x:f,y:ka(e-f)<Fa?n:d}:ka(i-d)<Fa&&h-r>Fa?{x:ka(n-d)<Fa?e:h,y:d}:ka(r-h)<Fa&&i-p>Fa?{x:h,y:ka(e-h)<Fa?n:p}:ka(i-p)<Fa&&r-f>Fa?{x:ka(n-p)<Fa?e:f,y:p}:null),o.site,null)),++s)}function Xn(t,e){return e.angle-t.angle}function Yn(){or(this),this.x=this.y=this.arc=this.site=this.cy=null}function Gn(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i.x,u=i.y,s=r.x-a,l=r.y-u,c=o.x-a,f=o.y-u,h=2*(s*f-l*c);if(!(h>=-Ba)){var p=s*s+l*l,d=c*c+f*f,g=(f*p-l*d)/h,v=(s*d-c*p)/h,f=v+u,m=hs.pop()||new Yn;m.arc=t,m.site=i,m.x=g+a,m.y=f+Math.sqrt(g*g+v*v),m.cy=f,t.circle=m;for(var y=null,b=cs._;b;)if(m.y<b.y||m.y===b.y&&m.x<=b.x){
if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}cs.insert(y,m),y||(ls=m)}}}}function Zn(t){var e=t.circle;e&&(e.P||(ls=e.N),cs.remove(e),hs.push(e),or(e),t.circle=null)}function Qn(t){for(var e,n=as,r=Ue(t[0][0],t[0][1],t[1][0],t[1][1]),i=n.length;i--;)e=n[i],(!Kn(e,t)||!r(e)||ka(e.a.x-e.b.x)<Fa&&ka(e.a.y-e.b.y)<Fa)&&(e.a=e.b=null,n.splice(i,1))}function Kn(t,e){var n=t.b;if(n)return!0;var r,i,o=t.a,a=e[0][0],u=e[1][0],s=e[0][1],l=e[1][1],c=t.l,f=t.r,h=c.x,p=c.y,d=f.x,g=f.y,v=(h+d)/2,m=(p+g)/2;if(g===p){if(a>v||v>=u)return;if(h>d){if(o){if(o.y>=l)return}else o={x:v,y:s};n={x:v,y:l}}else{if(o){if(o.y<s)return}else o={x:v,y:l};n={x:v,y:s}}}else if(r=(h-d)/(g-p),i=m-r*v,-1>r||r>1)if(h>d){if(o){if(o.y>=l)return}else o={x:(s-i)/r,y:s};n={x:(l-i)/r,y:l}}else{if(o){if(o.y<s)return}else o={x:(l-i)/r,y:l};n={x:(s-i)/r,y:s}}else if(g>p){if(o){if(o.x>=u)return}else o={x:a,y:r*a+i};n={x:u,y:r*u+i}}else{if(o){if(o.x<a)return}else o={x:u,y:r*u+i};n={x:a,y:r*a+i}}return t.a=o,t.b=n,!0}function Jn(t,e){this.l=t,this.r=e,this.a=this.b=null}function tr(t,e,n,r){var i=new Jn(t,e);return as.push(i),n&&nr(i,t,e,n),r&&nr(i,e,t,r),us[t.i].edges.push(new rr(i,t,e)),us[e.i].edges.push(new rr(i,e,t)),i}function er(t,e,n){var r=new Jn(t,null);return r.a=e,r.b=n,as.push(r),r}function nr(t,e,n,r){t.a||t.b?t.l===n?t.b=r:t.a=r:(t.a=r,t.l=e,t.r=n)}function rr(t,e,n){var r=t.a,i=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function ir(){this._=null}function or(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ar(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function ur(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function sr(t){for(;t.L;)t=t.L;return t}function lr(t,e){var n,r,i,o=t.sort(cr).pop();for(as=[],us=new Array(t.length),ss=new ir,cs=new ir;;)if(i=ls,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(us[o.i]=new $n(o),Hn(o),n=o.x,r=o.y),o=t.pop();else{if(!i)break;zn(i.arc)}e&&(Qn(e),Vn(e));var a={cells:us,edges:as};return ss=cs=as=us=null,a}function cr(t,e){return e.y-t.y||e.x-t.x}function fr(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}function hr(t){return t.x}function pr(t){return t.y}function dr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function gr(t,e,n,r,i,o){if(!t(e,n,r,i,o)){var a=.5*(n+i),u=.5*(r+o),s=e.nodes;s[0]&&gr(t,s[0],n,r,a,u),s[1]&&gr(t,s[1],a,r,i,u),s[2]&&gr(t,s[2],n,u,a,o),s[3]&&gr(t,s[3],a,u,i,o)}}function vr(t,e,n,r,i,o,a){var u,s=1/0;return function l(t,c,f,h,p){if(!(c>o||f>a||r>h||i>p)){if(d=t.point){var d,g=e-t.x,v=n-t.y,m=g*g+v*v;if(s>m){var y=Math.sqrt(s=m);r=e-y,i=n-y,o=e+y,a=n+y,u=d}}for(var b=t.nodes,x=.5*(c+h),w=.5*(f+p),k=e>=x,M=n>=w,_=M<<1|k,E=_+4;E>_;++_)if(t=b[3&_])switch(3&_){case 0:l(t,c,f,x,w);break;case 1:l(t,x,f,h,w);break;case 2:l(t,c,w,x,p);break;case 3:l(t,x,w,h,p)}}}(t,r,i,o,a),u}function mr(t,e){t=ca.rgb(t),e=ca.rgb(e);var n=t.r,r=t.g,i=t.b,o=e.r-n,a=e.g-r,u=e.b-i;return function(t){return"#"+kt(Math.round(n+o*t))+kt(Math.round(r+a*t))+kt(Math.round(i+u*t))}}function yr(t,e){var n,r={},i={};for(n in t)n in e?r[n]=wr(t[n],e[n]):i[n]=t[n];for(n in e)n in t||(i[n]=e[n]);return function(t){for(n in r)i[n]=r[n](t);return i}}function br(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function xr(t,e){var n,r,i,o=ds.lastIndex=gs.lastIndex=0,a=-1,u=[],s=[];for(t+="",e+="";(n=ds.exec(t))&&(r=gs.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(n=n[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:br(n,r)})),o=gs.lastIndex;return o<e.length&&(i=e.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?(e=s[0].x,function(t){return e(t)+""}):function(){return e}:(e=s.length,function(t){for(var n,r=0;e>r;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})}function wr(t,e){for(var n,r=ca.interpolators.length;--r>=0&&!(n=ca.interpolators[r](t,e)););return n}function kr(t,e){var n,r=[],i=[],o=t.length,a=e.length,u=Math.min(t.length,e.length);for(n=0;u>n;++n)r.push(wr(t[n],e[n]));for(;o>n;++n)i[n]=t[n];for(;a>n;++n)i[n]=e[n];return function(t){for(n=0;u>n;++n)i[n]=r[n](t);return i}}function Mr(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function _r(t){return function(e){return 1-t(1-e)}}function Er(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function Cr(t){return t*t}function Sr(t){return t*t*t}function Tr(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Nr(t){return function(e){return Math.pow(e,t)}}function Or(t){return 1-Math.cos(t*Ua)}function Ar(t){return Math.pow(2,10*(t-1))}function jr(t){return 1-Math.sqrt(1-t*t)}function Pr(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Ha*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Ha/e)}}function Lr(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Dr(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Rr(t,e){t=ca.hcl(t),e=ca.hcl(e);var n=t.h,r=t.c,i=t.l,o=e.h-n,a=e.c-r,u=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return ht(n+o*t,r+a*t,i+u*t)+""}}function Ir(t,e){t=ca.hsl(t),e=ca.hsl(e);var n=t.h,r=t.s,i=t.l,o=e.h-n,a=e.s-r,u=e.l-i;return isNaN(a)&&(a=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:-180>o&&(o+=360),function(t){return ct(n+o*t,r+a*t,i+u*t)+""}}function qr(t,e){t=ca.lab(t),e=ca.lab(e);var n=t.l,r=t.a,i=t.b,o=e.l-n,a=e.a-r,u=e.b-i;return function(t){return dt(n+o*t,r+a*t,i+u*t)+""}}function Fr(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function Br(t){var e=[t.a,t.b],n=[t.c,t.d],r=Hr(e),i=zr(e,n),o=Hr(Wr(n,e,-i))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*Va,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Va:0}function zr(t,e){return t[0]*e[0]+t[1]*e[1]}function Hr(t){var e=Math.sqrt(zr(t,t));return e&&(t[0]/=e,t[1]/=e),e}function Wr(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}function Ur(t){return t.length?t.pop()+",":""}function $r(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:br(t[0],e[0])},{i:i-2,x:br(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}function Vr(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(Ur(n)+"rotate(",null,")")-2,x:br(t,e)})):e&&n.push(Ur(n)+"rotate("+e+")")}function Xr(t,e,n,r){t!==e?r.push({i:n.push(Ur(n)+"skewX(",null,")")-2,x:br(t,e)}):e&&n.push(Ur(n)+"skewX("+e+")")}function Yr(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var i=n.push(Ur(n)+"scale(",null,",",null,")");r.push({i:i-4,x:br(t[0],e[0])},{i:i-2,x:br(t[1],e[1])})}else 1===e[0]&&1===e[1]||n.push(Ur(n)+"scale("+e+")")}function Gr(t,e){var n=[],r=[];return t=ca.transform(t),e=ca.transform(e),$r(t.translate,e.translate,n,r),Vr(t.rotate,e.rotate,n,r),Xr(t.skew,e.skew,n,r),Yr(t.scale,e.scale,n,r),t=e=null,function(t){for(var e,i=-1,o=r.length;++i<o;)n[(e=r[i]).i]=e.x(t);return n.join("")}}function Zr(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function Qr(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}function Kr(t){for(var e=t.source,n=t.target,r=ti(e,n),i=[e];e!==r;)e=e.parent,i.push(e);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function Jr(t){for(var e=[],n=t.parent;null!=n;)e.push(t),t=n,n=n.parent;return e.push(t),e}function ti(t,e){if(t===e)return t;for(var n=Jr(t),r=Jr(e),i=n.pop(),o=r.pop(),a=null;i===o;)a=i,i=n.pop(),o=r.pop();return a}function ei(t){t.fixed|=2}function ni(t){t.fixed&=-7}function ri(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ii(t){t.fixed&=-5}function oi(t,e,n){var r=0,i=0;if(t.charge=0,!t.leaf)for(var o,a=t.nodes,u=a.length,s=-1;++s<u;)o=a[s],null!=o&&(oi(o,e,n),t.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var l=e*n[t.point.index];t.charge+=t.pointCharge=l,r+=l*t.point.x,i+=l*t.point.y}t.cx=r/t.charge,t.cy=i/t.charge}function ai(t,e){return ca.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=hi,t}function ui(t,e){for(var n=[t];null!=(t=n.pop());)if(e(t),(i=t.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function si(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(o=t.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(t=r.pop());)e(t)}function li(t){return t.children}function ci(t){return t.value}function fi(t,e){return e.value-t.value}function hi(t){return ca.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function pi(t){return t.x}function di(t){return t.y}function gi(t,e,n){t.y0=e,t.y=n}function vi(t){return ca.range(t.length)}function mi(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function yi(t){for(var e,n=1,r=0,i=t[0][1],o=t.length;o>n;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function bi(t){return t.reduce(xi,0)}function xi(t,e){return t+e[1]}function wi(t,e){return ki(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function ki(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,o=[];++n<=e;)o[n]=i*n+r;return o}function Mi(t){return[ca.min(t),ca.max(t)]}function _i(t,e){return t.value-e.value}function Ei(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Ci(t,e){t._pack_next=e,e._pack_prev=t}function Si(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function Ti(t){function e(t){c=Math.min(t.x-t.r,c),f=Math.max(t.x+t.r,f),h=Math.min(t.y-t.r,h),p=Math.max(t.y+t.r,p)}if((n=t.children)&&(l=n.length)){var n,r,i,o,a,u,s,l,c=1/0,f=-(1/0),h=1/0,p=-(1/0);if(n.forEach(Ni),r=n[0],r.x=-r.r,r.y=0,e(r),l>1&&(i=n[1],i.x=i.r,i.y=0,e(i),l>2))for(o=n[2],ji(r,i,o),e(o),Ei(r,o),r._pack_prev=o,Ei(o,i),i=r._pack_next,a=3;l>a;a++){ji(r,i,o=n[a]);var d=0,g=1,v=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(Si(u,o)){d=1;break}if(1==d)for(s=r._pack_prev;s!==u._pack_prev&&!Si(s,o);s=s._pack_prev,v++);d?(v>g||g==v&&i.r<r.r?Ci(r,i=u):Ci(r=s,i),a--):(Ei(r,o),i=o,e(o))}var m=(c+f)/2,y=(h+p)/2,b=0;for(a=0;l>a;a++)o=n[a],o.x-=m,o.y-=y,b=Math.max(b,o.r+Math.sqrt(o.x*o.x+o.y*o.y));t.r=b,n.forEach(Oi)}}function Ni(t){t._pack_next=t._pack_prev=t}function Oi(t){delete t._pack_next,delete t._pack_prev}function Ai(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var o=-1,a=i.length;++o<a;)Ai(i[o],e,n,r)}function ji(t,e,n){var r=t.r+n.r,i=e.x-t.x,o=e.y-t.y;if(r&&(i||o)){var a=e.r+n.r,u=i*i+o*o;a*=a,r*=r;var s=.5+(r-a)/(2*u),l=Math.sqrt(Math.max(0,2*a*(r+u)-(r-=u)*r-a*a))/(2*u);n.x=t.x+s*i+l*o,n.y=t.y+s*o-l*i}else n.x=t.x+r,n.y=t.y}function Pi(t,e){return t.parent==e.parent?1:2}function Li(t){var e=t.children;return e.length?e[0]:t.t}function Di(t){var e,n=t.children;return(e=n.length)?n[e-1]:t.t}function Ri(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Ii(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)e=i[o],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function qi(t,e,n){return t.a.parent===e.parent?t.a:n}function Fi(t){return 1+ca.max(t,function(t){return t.y})}function Bi(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function zi(t){var e=t.children;return e&&e.length?zi(e[0]):t}function Hi(t){var e,n=t.children;return n&&(e=n.length)?Hi(n[e-1]):t}function Wi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ui(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:n,y:r,dx:i,dy:o}}function $i(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Vi(t){return t.rangeExtent?t.rangeExtent():$i(t.range())}function Xi(t,e,n,r){var i=n(t[0],t[1]),o=r(e[0],e[1]);return function(t){return o(i(t))}}function Yi(t,e){var n,r=0,i=t.length-1,o=t[r],a=t[i];return o>a&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t}function Gi(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Cs}function Zi(t,e,n,r){var i=[],o=[],a=0,u=Math.min(t.length,e.length)-1;for(t[u]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<=u;)i.push(n(t[a-1],t[a])),o.push(r(e[a-1],e[a]));return function(e){var n=ca.bisect(t,e,1,u)-1;return o[n](i[n](e))}}function Qi(t,e,n,r){function i(){var i=Math.min(t.length,e.length)>2?Zi:Xi,s=r?Qr:Zr;return a=i(t,e,s,n),u=i(e,t,s,wr),o}function o(t){return a(t)}var a,u;return o.invert=function(t){return u(t)},o.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},o.range=function(t){return arguments.length?(e=t,i()):e},o.rangeRound=function(t){return o.range(t).interpolate(Fr)},o.clamp=function(t){return arguments.length?(r=t,i()):r},o.interpolate=function(t){return arguments.length?(n=t,i()):n},o.ticks=function(e){return eo(t,e)},o.tickFormat=function(e,n){return no(t,e,n)},o.nice=function(e){return Ji(t,e),i()},o.copy=function(){return Qi(t,e,n,r)},i()}function Ki(t,e){return ca.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ji(t,e){return Yi(t,Gi(to(t,e)[2])),Yi(t,Gi(to(t,e)[2])),t}function to(t,e){null==e&&(e=10);var n=$i(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function eo(t,e){return ca.range.apply(ca,to(t,e))}function no(t,e,n){var r=to(t,e);if(n){var i=du.exec(n);if(i.shift(),"s"===i[8]){var o=ca.formatPrefix(Math.max(ka(r[0]),ka(r[1])));return i[7]||(i[7]="."+ro(o.scale(r[2]))),i[8]="f",n=ca.format(i.join("")),function(t){return n(o.scale(t))+o.symbol}}i[7]||(i[7]="."+io(i[8],r)),n=i.join("")}else n=",."+ro(r[2])+"f";return ca.format(n)}function ro(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function io(t,e){var n=ro(e[2]);return t in Ss?Math.abs(n-ro(Math.max(ka(e[0]),ka(e[1]))))+ +("e"!==t):n-2*("%"===t)}function oo(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function o(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function a(e){return t(i(e))}return a.invert=function(e){return o(t.invert(e))},a.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),a):r},a.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),a):e},a.nice=function(){var e=Yi(r.map(i),n?Math:Ns);return t.domain(e),r=e.map(o),a},a.ticks=function(){var t=$i(r),a=[],u=t[0],s=t[1],l=Math.floor(i(u)),c=Math.ceil(i(s)),f=e%1?2:e;if(isFinite(c-l)){if(n){for(;c>l;l++)for(var h=1;f>h;h++)a.push(o(l)*h);a.push(o(l))}else for(a.push(o(l));l++<c;)for(var h=f-1;h>0;h--)a.push(o(l)*h);for(l=0;a[l]<u;l++);for(c=a.length;a[c-1]>s;c--);a=a.slice(l,c)}return a},a.tickFormat=function(t,n){if(!arguments.length)return Ts;arguments.length<2?n=Ts:"function"!=typeof n&&(n=ca.format(n));var r=Math.max(1,e*t/a.ticks().length);return function(t){var a=t/o(Math.round(i(t)));return e-.5>a*e&&(a*=e),r>=a?n(t):""}},a.copy=function(){return oo(t.copy(),e,n,r)},Ki(a,t)}function ao(t,e,n){function r(e){return t(i(e))}var i=uo(e),o=uo(1/e);return r.invert=function(e){return o(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return eo(n,t)},r.tickFormat=function(t,e){return no(n,t,e)},r.nice=function(t){return r.domain(Ji(n,t))},r.exponent=function(a){return arguments.length?(i=uo(e=a),o=uo(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return ao(t.copy(),e,n)},Ki(r,t)}function uo(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function so(t,e){function n(n){return o[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):NaN))-1)%o.length]}function r(e,n){return ca.range(t.length).map(function(t){return e+n*t})}var i,o,a;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new f;for(var o,a=-1,u=r.length;++a<u;)i.has(o=r[a])||i.set(o,t.push(o));return n[e.t].apply(n,e.a)},n.range=function(t){return arguments.length?(o=t,a=0,e={t:"range",a:arguments},n):o},n.rangePoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],l=i[1],c=t.length<2?(s=(s+l)/2,0):(l-s)/(t.length-1+u);return o=r(s+c*u/2,c),a=0,e={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(i,u){arguments.length<2&&(u=0);var s=i[0],l=i[1],c=t.length<2?(s=l=Math.round((s+l)/2),0):(l-s)/(t.length-1+u)|0;return o=r(s+Math.round(c*u/2+(l-s-(t.length-1+u)*c)/2),c),a=0,e={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=(f-c)/(t.length-u+2*s);return o=r(c+h*s,h),l&&o.reverse(),a=h*(1-u),e={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(i,u,s){arguments.length<2&&(u=0),arguments.length<3&&(s=u);var l=i[1]<i[0],c=i[l-0],f=i[1-l],h=Math.floor((f-c)/(t.length-u+2*s));return o=r(c+Math.round((f-c-(t.length-u)*h)/2),h),l&&o.reverse(),a=Math.round(h*(1-u)),e={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return a},n.rangeExtent=function(){return $i(e.a[0])},n.copy=function(){return so(t,e)},n.domain(t)}function lo(t,e){function n(){var n=0,i=e.length;for(u=[];++n<i;)u[n-1]=ca.quantile(t,n/i);return r}function r(t){return isNaN(t=+t)?void 0:e[ca.bisect(u,t)]}var u;return r.domain=function(e){return arguments.length?(t=e.map(o).filter(a).sort(i),n()):t},r.range=function(t){return arguments.length?(e=t,n()):e},r.quantiles=function(){return u},r.invertExtent=function(n){return n=e.indexOf(n),0>n?[NaN,NaN]:[n>0?u[n-1]:t[0],n<u.length?u[n]:t[t.length-1]]},r.copy=function(){return lo(t,e)},n()}function co(t,e,n){function r(e){return n[Math.max(0,Math.min(a,Math.floor(o*(e-t))))]}function i(){return o=n.length/(e-t),a=n.length-1,r}var o,a;return r.domain=function(n){return arguments.length?(t=+n[0],e=+n[n.length-1],i()):[t,e]},r.range=function(t){return arguments.length?(n=t,i()):n},r.invertExtent=function(e){return e=n.indexOf(e),e=0>e?NaN:e/o+t,[e,e+1/o]},r.copy=function(){return co(t,e,n)},i()}function fo(t,e){function n(n){return n>=n?e[ca.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return fo(t,e)},n}function ho(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return eo(t,e)},e.tickFormat=function(e,n){return no(t,e,n)},e.copy=function(){return ho(t)},e}function po(){return 0}function go(t){return t.innerRadius}function vo(t){return t.outerRadius}function mo(t){return t.startAngle}function yo(t){return t.endAngle}function bo(t){return t&&t.padAngle}function xo(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function wo(t,e,n,r,i){var o=t[0]-e[0],a=t[1]-e[1],u=(i?r:-r)/Math.sqrt(o*o+a*a),s=u*a,l=-u*o,c=t[0]+s,f=t[1]+l,h=e[0]+s,p=e[1]+l,d=(c+h)/2,g=(f+p)/2,v=h-c,m=p-f,y=v*v+m*m,b=n-r,x=c*p-h*f,w=(0>m?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),k=(x*m-v*w)/y,M=(-x*v-m*w)/y,_=(x*m+v*w)/y,E=(-x*v+m*w)/y,C=k-d,S=M-g,T=_-d,N=E-g;return C*C+S*S>T*T+N*N&&(k=_,M=E),[[k-s,M-l],[k*n/b,M*n/b]]}function ko(t){function e(e){function a(){l.push("M",o(t(c),u))}for(var s,l=[],c=[],f=-1,h=e.length,p=Tt(n),d=Tt(r);++f<h;)i.call(this,s=e[f],f)?c.push([+p.call(this,s,f),+d.call(this,s,f)]):c.length&&(a(),c=[]);return c.length&&a(),l.length?l.join(""):null}var n=An,r=jn,i=Ae,o=Mo,a=o.key,u=.7;return e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(r=t,e):r},e.defined=function(t){return arguments.length?(i=t,e):i},e.interpolate=function(t){return arguments.length?(a="function"==typeof t?o=t:(o=Ds.get(t)||Mo).key,e):a},e.tension=function(t){return arguments.length?(u=t,e):u},e}function Mo(t){return t.length>1?t.join("L"):t+"Z"}function _o(t){return t.join("L")+"Z"}function Eo(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);return n>1&&i.push("H",r[0]),i.join("")}function Co(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("V",(r=t[e])[1],"H",r[0]);return i.join("")}function So(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e<n;)i.push("H",(r=t[e])[0],"V",r[1]);return i.join("")}function To(t,e){return t.length<4?Mo(t):t[1]+Ao(t.slice(1,-1),jo(t,e))}function No(t,e){return t.length<3?_o(t):t[0]+Ao((t.push(t[0]),t),jo([t[t.length-2]].concat(t,[t[1]]),e))}function Oo(t,e){return t.length<3?Mo(t):t[0]+Ao(t,jo(t,e))}function Ao(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Mo(t);var n=t.length!=e.length,r="",i=t[0],o=t[1],a=e[0],u=a,s=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=t[1],s=2),e.length>1){u=e[1],o=t[s],s++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1];for(var l=2;l<e.length;l++,s++)o=t[s],u=e[l],r+="S"+(o[0]-u[0])+","+(o[1]-u[1])+","+o[0]+","+o[1]}if(n){var c=t[s];r+="Q"+(o[0]+2*u[0]/3)+","+(o[1]+2*u[1]/3)+","+c[0]+","+c[1]}return r}function jo(t,e){for(var n,r=[],i=(1-e)/2,o=t[0],a=t[1],u=1,s=t.length;++u<s;)n=o,o=a,a=t[u],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function Po(t){if(t.length<3)return Mo(t);var e=1,n=t.length,r=t[0],i=r[0],o=r[1],a=[i,i,i,(r=t[1])[0]],u=[o,o,o,r[1]],s=[i,",",o,"L",Io(qs,a),",",Io(qs,u)];for(t.push(t[n-1]);++e<=n;)r=t[e],a.shift(),a.push(r[0]),u.shift(),u.push(r[1]),qo(s,a,u);return t.pop(),s.push("L",r),s.join("")}function Lo(t){if(t.length<4)return Mo(t);for(var e,n=[],r=-1,i=t.length,o=[0],a=[0];++r<3;)e=t[r],o.push(e[0]),a.push(e[1]);for(n.push(Io(qs,o)+","+Io(qs,a)),--r;++r<i;)e=t[r],o.shift(),o.push(e[0]),a.shift(),a.push(e[1]),qo(n,o,a);return n.join("")}function Do(t){for(var e,n,r=-1,i=t.length,o=i+4,a=[],u=[];++r<4;)n=t[r%i],a.push(n[0]),u.push(n[1]);for(e=[Io(qs,a),",",Io(qs,u)],--r;++r<o;)n=t[r%i],a.shift(),a.push(n[0]),u.shift(),u.push(n[1]),qo(e,a,u);return e.join("")}function Ro(t,e){var n=t.length-1;if(n)for(var r,i,o=t[0][0],a=t[0][1],u=t[n][0]-o,s=t[n][1]-a,l=-1;++l<=n;)r=t[l],i=l/n,r[0]=e*r[0]+(1-e)*(o+i*u),r[1]=e*r[1]+(1-e)*(a+i*s);return Po(t)}function Io(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function qo(t,e,n){t.push("C",Io(Rs,e),",",Io(Rs,n),",",Io(Is,e),",",Io(Is,n),",",Io(qs,e),",",Io(qs,n))}function Fo(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Bo(t){for(var e=0,n=t.length-1,r=[],i=t[0],o=t[1],a=r[0]=Fo(i,o);++e<n;)r[e]=(a+(a=Fo(i=o,o=t[e+1])))/2;return r[e]=a,r}function zo(t){for(var e,n,r,i,o=[],a=Bo(t),u=-1,s=t.length-1;++u<s;)e=Fo(t[u],t[u+1]),ka(e)<Fa?a[u]=a[u+1]=0:(n=a[u]/e,r=a[u+1]/e,i=n*n+r*r,i>9&&(i=3*e/Math.sqrt(i),a[u]=i*n,a[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+a[u]*a[u])),o.push([i||0,a[u]*i||0]);return o}function Ho(t){return t.length<3?Mo(t):t[0]+Ao(t,zo(t))}function Wo(t){for(var e,n,r,i=-1,o=t.length;++i<o;)e=t[i],n=e[0],r=e[1]-Ua,e[0]=n*Math.cos(r),e[1]=n*Math.sin(r);return t}function Uo(t){function e(e){function s(){g.push("M",u(t(m),f),c,l(t(v.reverse()),f),"Z")}for(var h,p,d,g=[],v=[],m=[],y=-1,b=e.length,x=Tt(n),w=Tt(i),k=n===r?function(){return p}:Tt(r),M=i===o?function(){return d}:Tt(o);++y<b;)a.call(this,h=e[y],y)?(v.push([p=+x.call(this,h,y),d=+w.call(this,h,y)]),m.push([+k.call(this,h,y),+M.call(this,h,y)])):v.length&&(s(),v=[],m=[]);return v.length&&s(),g.length?g.join(""):null}var n=An,r=An,i=0,o=jn,a=Ae,u=Mo,s=u.key,l=u,c="L",f=.7;return e.x=function(t){return arguments.length?(n=r=t,e):r},e.x0=function(t){return arguments.length?(n=t,e):n},e.x1=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(i=o=t,e):o},e.y0=function(t){return arguments.length?(i=t,e):i},e.y1=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(a=t,e):a},e.interpolate=function(t){return arguments.length?(s="function"==typeof t?u=t:(u=Ds.get(t)||Mo).key,l=u.reverse||u,c=u.closed?"M":"L",e):s},e.tension=function(t){return arguments.length?(f=t,e):f},e}function $o(t){return t.radius}function Vo(t){return[t.x,t.y]}function Xo(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-Ua;return[n*Math.cos(r),n*Math.sin(r)]}}function Yo(){return 64}function Go(){return"circle"}function Zo(t){var e=Math.sqrt(t/za);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}function Qo(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Ko(t,e,n){return Sa(t,$s),t.namespace=e,t.id=n,t}function Jo(t,e,n,r){var i=t.id,o=t.namespace;return $(t,"function"==typeof n?function(t,a,u){t[o][i].tween.set(e,r(n.call(t,t.__data__,a,u)))}:(n=r(n),function(t){t[o][i].tween.set(e,n)}))}function ta(t){return null==t&&(t=""),function(){this.textContent=t}}function ea(t){return null==t?"__transition__":"__transition_"+t+"__"}function na(t,e,n,r,i){function o(t){var e=g.delay;return l.t=e+s,t>=e?a(t-e):void(l.c=a)}function a(n){var i=d.active,o=d[i];o&&(o.timer.c=null,o.timer.t=NaN,--d.count,delete d[i],o.event&&o.event.interrupt.call(t,t.__data__,o.index));for(var a in d)if(r>+a){var f=d[a];f.timer.c=null,f.timer.t=NaN,--d.count,delete d[a]}l.c=u,Pt(function(){return l.c&&u(n||1)&&(l.c=null,l.t=NaN),1},0,s),d.active=r,g.event&&g.event.start.call(t,t.__data__,e),p=[],g.tween.forEach(function(n,r){(r=r.call(t,t.__data__,e))&&p.push(r)}),h=g.ease,c=g.duration}function u(i){for(var o=i/c,a=h(o),u=p.length;u>0;)p[--u].call(t,a);return o>=1?(g.event&&g.event.end.call(t,t.__data__,e),--d.count?delete d[r]:delete t[n],1):void 0}var s,l,c,h,p,d=t[n]||(t[n]={active:0,count:0}),g=d[r];g||(s=i.time,l=Pt(o,0,s),g=d[r]={tween:new f,time:s,timer:l,delay:i.delay,duration:i.duration,ease:i.ease,index:e},i=null,++d.count)}function ra(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function ia(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function oa(t){return t.toISOString()}function aa(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,o=ca.bisect(tl,i);return o==tl.length?[e.year,to(t.map(function(t){return t/31536e6}),n)[2]]:o?e[i/tl[o-1]<tl[o]/i?o-1:o]:[rl,to(t,n)[2]]}return r.invert=function(e){return ua(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain(e),r):t.domain().map(ua)},r.nice=function(t,e){function n(n){return!isNaN(n)&&!t.range(n,ua(+n+1),e).length}var o=r.domain(),a=$i(o),u=null==t?i(a,10):"number"==typeof t&&i(a,t);return u&&(t=u[0],e=u[1]),r.domain(Yi(o,e>1?{floor:function(e){for(;n(e=t.floor(e));)e=ua(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=ua(+e+1);return e}}:t))},r.ticks=function(t,e){var n=$i(r.domain()),o=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return o&&(t=o[0],e=o[1]),t.range(n[0],ua(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return aa(t.copy(),e,n)},Ki(r,t)}function ua(t){return new Date(t)}function sa(t){return JSON.parse(t.responseText)}function la(t){var e=pa.createRange();return e.selectNode(pa.body),e.createContextualFragment(t.responseText)}var ca={version:"3.5.17"},fa=[].slice,ha=function(t){return fa.call(t)},pa=this.document;if(pa)try{ha(pa.documentElement.childNodes)[0].nodeType}catch(da){ha=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}if(Date.now||(Date.now=function(){return+new Date}),pa)try{pa.createElement("DIV").style.setProperty("opacity",0,"")}catch(ga){var va=this.Element.prototype,ma=va.setAttribute,ya=va.setAttributeNS,ba=this.CSSStyleDeclaration.prototype,xa=ba.setProperty;va.setAttribute=function(t,e){ma.call(this,t,e+"")},va.setAttributeNS=function(t,e,n){ya.call(this,t,e,n+"")},ba.setProperty=function(t,e,n){xa.call(this,t,e+"",n)}}ca.ascending=i,ca.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:NaN},ca.min=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&n>r&&(n=r)}return n},ca.max=function(t,e){var n,r,i=-1,o=t.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=t[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=t[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=e.call(t,t[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=e.call(t,t[i],i))&&r>n&&(n=r)}return n},ca.extent=function(t,e){var n,r,i,o=-1,a=t.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=t[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t[o])&&(n>r&&(n=r),r>i&&(i=r))}else{for(;++o<a;)if(null!=(r=e.call(t,t[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e.call(t,t[o],o))&&(n>r&&(n=r),r>i&&(i=r))}return[n,i]},ca.sum=function(t,e){var n,r=0,i=t.length,o=-1;if(1===arguments.length)for(;++o<i;)a(n=+t[o])&&(r+=n);else for(;++o<i;)a(n=+e.call(t,t[o],o))&&(r+=n);return r},ca.mean=function(t,e){var n,r=0,i=t.length,u=-1,s=i;if(1===arguments.length)for(;++u<i;)a(n=o(t[u]))?r+=n:--s;else for(;++u<i;)a(n=o(e.call(t,t[u],u)))?r+=n:--s;return s?r/s:void 0},ca.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),i=+t[r-1],o=n-r;return o?i+o*(t[r]-i):i},ca.median=function(t,e){var n,r=[],u=t.length,s=-1;if(1===arguments.length)for(;++s<u;)a(n=o(t[s]))&&r.push(n);else for(;++s<u;)a(n=o(e.call(t,t[s],s)))&&r.push(n);return r.length?ca.quantile(r.sort(i),.5):void 0},ca.variance=function(t,e){var n,r,i=t.length,u=0,s=0,l=-1,c=0;if(1===arguments.length)for(;++l<i;)a(n=o(t[l]))&&(r=n-u,u+=r/++c,s+=r*(n-u));else for(;++l<i;)a(n=o(e.call(t,t[l],l)))&&(r=n-u,u+=r/++c,s+=r*(n-u));return c>1?s/(c-1):void 0},ca.deviation=function(){var t=ca.variance.apply(this,arguments);return t?Math.sqrt(t):t};var wa=u(i);ca.bisectLeft=wa.left,ca.bisect=ca.bisectRight=wa.right,ca.bisector=function(t){return u(1===t.length?function(e,n){return i(t(e),n)}:t)},ca.shuffle=function(t,e,n){(o=arguments.length)<3&&(n=t.length,2>o&&(e=0));for(var r,i,o=n-e;o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},ca.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},ca.pairs=function(t){for(var e,n=0,r=t.length-1,i=t[0],o=new Array(0>r?0:r);r>n;)o[n]=[e=i,i=t[++n]];return o},ca.transpose=function(t){if(!(i=t.length))return[];for(var e=-1,n=ca.min(t,s),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r},ca.zip=function(){return ca.transpose(arguments)},ca.keys=function(t){var e=[];for(var n in t)e.push(n);return e},ca.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ca.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},ca.merge=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(r=t[i],e=r.length;--e>=0;)n[--a]=r[e];return n};var ka=Math.abs;ca.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r,i=[],o=l(ka(n)),a=-1;if(t*=o,e*=o,n*=o,0>n)for(;(r=t+n*++a)>e;)i.push(r/o);else for(;(r=t+n*++a)<e;)i.push(r/o);return i},ca.map=function(t,e){var n=new f;if(t instanceof f)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(1===arguments.length)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e.call(t,r=t[i],i),r)}else for(var a in t)n.set(a,t[a]);return n};var Ma="__proto__",_a="\x00";c(f,{has:d,get:function(t){return this._[h(t)]},set:function(t,e){return this._[h(t)]=e},remove:g,keys:v,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:p(e),value:this._[e]});return t},size:m,empty:y,forEach:function(t){for(var e in this._)t.call(this,p(e),this._[e])}}),ca.nest=function(){function t(e,a,u){if(u>=o.length)return r?r.call(i,a):n?a.sort(n):a;for(var s,l,c,h,p=-1,d=a.length,g=o[u++],v=new f;++p<d;)(h=v.get(s=g(l=a[p])))?h.push(l):v.set(s,[l]);
return e?(l=e(),c=function(n,r){l.set(n,t(e,r,u))}):(l={},c=function(n,r){l[n]=t(e,r,u)}),v.forEach(c),l}function e(t,n){if(n>=o.length)return t;var r=[],i=a[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},o=[],a=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(ca.map,n,0),0)},i.key=function(t){return o.push(t),i},i.sortKeys=function(t){return a[o.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},ca.set=function(t){var e=new b;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},c(b,{has:d,add:function(t){return this._[h(t+="")]=!0,t},remove:g,values:v,size:m,empty:y,forEach:function(t){for(var e in this._)t.call(this,p(e))}}),ca.behavior={},ca.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r<i;)t[n=arguments[r]]=w(t,e,e[n]);return t};var Ea=["webkit","ms","moz","Moz","o","O"];ca.dispatch=function(){for(var t=new _,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=E(t);return t},_.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},ca.event=null,ca.requote=function(t){return t.replace(Ca,"\\$&")};var Ca=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Sa={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},Ta=function(t,e){return e.querySelector(t)},Na=function(t,e){return e.querySelectorAll(t)},Oa=function(t,e){var n=t.matches||t[k(t,"matchesSelector")];return(Oa=function(t,e){return n.call(t,e)})(t,e)};"function"==typeof Sizzle&&(Ta=function(t,e){return Sizzle(t,e)[0]||null},Na=Sizzle,Oa=Sizzle.matchesSelector),ca.selection=function(){return ca.select(pa.documentElement)};var Aa=ca.selection.prototype=[];Aa.select=function(t){var e,n,r,i,o=[];t=O(t);for(var a=-1,u=this.length;++a<u;){o.push(e=[]),e.parentNode=(r=this[a]).parentNode;for(var s=-1,l=r.length;++s<l;)(i=r[s])?(e.push(n=t.call(i,i.__data__,s,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):e.push(null)}return N(o)},Aa.selectAll=function(t){var e,n,r=[];t=A(t);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],u=-1,s=a.length;++u<s;)(n=a[u])&&(r.push(e=ha(t.call(n,n.__data__,u,i))),e.parentNode=n);return N(r)};var ja="http://www.w3.org/1999/xhtml",Pa={svg:"http://www.w3.org/2000/svg",xhtml:ja,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};ca.ns={prefix:Pa,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Pa.hasOwnProperty(n)?{space:Pa[n],local:t}:t}},Aa.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=ca.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(j(e,t[e]));return this}return this.each(j(t,e))},Aa.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=D(t)).length,i=-1;if(e=n.classList){for(;++i<r;)if(!e.contains(t[i]))return!1}else for(e=n.getAttribute("class");++i<r;)if(!L(t[i]).test(e))return!1;return!0}for(e in t)this.each(R(e,t[e]));return this}return this.each(R(t,e))},Aa.style=function(t,e,n){var i=arguments.length;if(3>i){if("string"!=typeof t){2>i&&(e="");for(n in t)this.each(q(n,t[n],e));return this}if(2>i){var o=this.node();return r(o).getComputedStyle(o,null).getPropertyValue(t)}n=""}return this.each(q(t,e,n))},Aa.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(F(e,t[e]));return this}return this.each(F(t,e))},Aa.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Aa.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Aa.append=function(t){return t=B(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Aa.insert=function(t,e){return t=B(t),e=O(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},Aa.remove=function(){return this.each(z)},Aa.data=function(t,e){function n(t,n){var r,i,o,a=t.length,c=n.length,h=Math.min(a,c),p=new Array(c),d=new Array(c),g=new Array(a);if(e){var v,m=new f,y=new Array(a);for(r=-1;++r<a;)(i=t[r])&&(m.has(v=e.call(i,i.__data__,r))?g[r]=i:m.set(v,i),y[r]=v);for(r=-1;++r<c;)(i=m.get(v=e.call(n,o=n[r],r)))?i!==!0&&(p[r]=i,i.__data__=o):d[r]=H(o),m.set(v,!0);for(r=-1;++r<a;)r in y&&m.get(y[r])!==!0&&(g[r]=t[r])}else{for(r=-1;++r<h;)i=t[r],o=n[r],i?(i.__data__=o,p[r]=i):d[r]=H(o);for(;c>r;++r)d[r]=H(n[r]);for(;a>r;++r)g[r]=t[r]}d.update=p,d.parentNode=p.parentNode=g.parentNode=t.parentNode,u.push(d),s.push(p),l.push(g)}var r,i,o=-1,a=this.length;if(!arguments.length){for(t=new Array(a=(r=this[0]).length);++o<a;)(i=r[o])&&(t[o]=i.__data__);return t}var u=V([]),s=N([]),l=N([]);if("function"==typeof t)for(;++o<a;)n(r=this[o],t.call(r,r.parentNode.__data__,o));else for(;++o<a;)n(r=this[o],t);return s.enter=function(){return u},s.exit=function(){return l},s},Aa.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},Aa.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=W(t));for(var o=0,a=this.length;a>o;o++){i.push(e=[]),e.parentNode=(n=this[o]).parentNode;for(var u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,o)&&e.push(r)}return N(i)},Aa.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n,r=this[t],i=r.length-1,o=r[i];--i>=0;)(n=r[i])&&(o&&o!==n.nextSibling&&o.parentNode.insertBefore(n,o),o=n);return this},Aa.sort=function(t){t=U.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()},Aa.each=function(t){return $(this,function(e,n,r){t.call(e,e.__data__,n,r)})},Aa.call=function(t){var e=ha(arguments);return t.apply(e[0]=this,e),this},Aa.empty=function(){return!this.node()},Aa.node=function(){for(var t=0,e=this.length;e>t;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var o=n[r];if(o)return o}return null},Aa.size=function(){var t=0;return $(this,function(){++t}),t};var La=[];ca.selection.enter=V,ca.selection.enter.prototype=La,La.append=Aa.append,La.empty=Aa.empty,La.node=Aa.node,La.call=Aa.call,La.size=Aa.size,La.select=function(t){for(var e,n,r,i,o,a=[],u=-1,s=this.length;++u<s;){r=(i=this[u]).update,a.push(e=[]),e.parentNode=i.parentNode;for(var l=-1,c=i.length;++l<c;)(o=i[l])?(e.push(r[l]=n=t.call(i.parentNode,o.__data__,l,u)),n.__data__=o.__data__):e.push(null)}return N(a)},La.insert=function(t,e){return arguments.length<2&&(e=X(this)),Aa.insert.call(this,t,e)},ca.select=function(t){var n;return"string"==typeof t?(n=[Ta(t,pa)],n.parentNode=pa.documentElement):(n=[t],n.parentNode=e(t)),N([n])},ca.selectAll=function(t){var e;return"string"==typeof t?(e=ha(Na(t,pa)),e.parentNode=pa.documentElement):(e=ha(t),e.parentNode=null),N([e])},Aa.on=function(t,e,n){var r=arguments.length;if(3>r){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(Y(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(Y(t,e,n))};var Da=ca.map({mouseenter:"mouseover",mouseleave:"mouseout"});pa&&Da.forEach(function(t){"on"+t in pa&&Da.remove(t)});var Ra,Ia=0;ca.mouse=function(t){return K(t,S())};var qa=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;ca.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=S().changedTouches),e)for(var r,i=0,o=e.length;o>i;++i)if((r=e[i]).identifier===n)return K(t,r)},ca.behavior.drag=function(){function t(){this.on("mousedown.drag",o).on("touchstart.drag",a)}function e(t,e,r,o,a){return function(){function u(){var t,n,r=e(h,g);r&&(t=r[0]-b[0],n=r[1]-b[1],d|=t|n,b=r,p({type:"drag",x:r[0]+l[0],y:r[1]+l[1],dx:t,dy:n}))}function s(){e(h,g)&&(m.on(o+v,null).on(a+v,null),y(d),p({type:"dragend"}))}var l,c=this,f=ca.event.target.correspondingElement||ca.event.target,h=c.parentNode,p=n.of(c,arguments),d=0,g=t(),v=".drag"+(null==g?"":"-"+g),m=ca.select(r(f)).on(o+v,u).on(a+v,s),y=Q(f),b=e(h,g);i?(l=i.apply(c,arguments),l=[l.x-b[0],l.y-b[1]]):l=[0,0],p({type:"dragstart"})}}var n=T(t,"drag","dragstart","dragend"),i=null,o=e(M,ca.mouse,r,"mousemove","mouseup"),a=e(J,ca.touch,x,"touchmove","touchend");return t.origin=function(e){return arguments.length?(i=e,t):i},ca.rebind(t,n,"on")},ca.touches=function(t,e){return arguments.length<2&&(e=S().touches),e?ha(e).map(function(e){var n=K(t,e);return n.identifier=e.identifier,n}):[]};var Fa=1e-6,Ba=Fa*Fa,za=Math.PI,Ha=2*za,Wa=Ha-Fa,Ua=za/2,$a=za/180,Va=180/za,Xa=Math.SQRT2,Ya=2,Ga=4;ca.interpolateZoom=function(t,e){var n,r,i=t[0],o=t[1],a=t[2],u=e[0],s=e[1],l=e[2],c=u-i,f=s-o,h=c*c+f*f;if(Ba>h)r=Math.log(l/a)/Xa,n=function(t){return[i+t*c,o+t*f,a*Math.exp(Xa*t*r)]};else{var p=Math.sqrt(h),d=(l*l-a*a+Ga*h)/(2*a*Ya*p),g=(l*l-a*a-Ga*h)/(2*l*Ya*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-v)/Xa,n=function(t){var e=t*r,n=ot(v),u=a/(Ya*p)*(n*at(Xa*e+v)-it(v));return[i+u*c,o+u*f,a*n/ot(Xa*e+v)]}}return n.duration=1e3*r,n},ca.behavior.zoom=function(){function t(t){t.on(A,f).on(Qa+".zoom",p).on("dblclick.zoom",d).on(L,h)}function e(t){return[(t[0]-_.x)/_.k,(t[1]-_.y)/_.k]}function n(t){return[t[0]*_.k+_.x,t[1]*_.k+_.y]}function i(t){_.k=Math.max(S[0],Math.min(S[1],t))}function o(t,e){e=n(e),_.x+=t[0]-e[0],_.y+=t[1]-e[1]}function a(e,n,r,a){e.__chart__={x:_.x,y:_.y,k:_.k},i(Math.pow(2,a)),o(v=n,r),e=ca.select(e),N>0&&(e=e.transition().duration(N)),e.call(t.event)}function u(){w&&w.domain(x.range().map(function(t){return(t-_.x)/_.k}).map(x.invert)),M&&M.domain(k.range().map(function(t){return(t-_.y)/_.k}).map(k.invert))}function s(t){O++||t({type:"zoomstart"})}function l(t){u(),t({type:"zoom",scale:_.k,translate:[_.x,_.y]})}function c(t){--O||(t({type:"zoomend"}),v=null)}function f(){function t(){u=1,o(ca.mouse(i),h),l(a)}function n(){f.on(j,null).on(P,null),p(u),c(a)}var i=this,a=D.of(i,arguments),u=0,f=ca.select(r(i)).on(j,t).on(P,n),h=e(ca.mouse(i)),p=Q(i);Us.call(i),s(a)}function h(){function t(){var t=ca.touches(d);return p=_.k,t.forEach(function(t){t.identifier in v&&(v[t.identifier]=e(t))}),t}function n(){var e=ca.event.target;ca.select(e).on(x,r).on(w,u),k.push(e);for(var n=ca.event.changedTouches,i=0,o=n.length;o>i;++i)v[n[i].identifier]=null;var s=t(),l=Date.now();if(1===s.length){if(500>l-b){var c=s[0];a(d,c,v[c.identifier],Math.floor(Math.log(_.k)/Math.LN2)+1),C()}b=l}else if(s.length>1){var c=s[0],f=s[1],h=c[0]-f[0],p=c[1]-f[1];m=h*h+p*p}}function r(){var t,e,n,r,a=ca.touches(d);Us.call(d);for(var u=0,s=a.length;s>u;++u,r=null)if(n=a[u],r=v[n.identifier]){if(e)break;t=n,e=r}if(r){var c=(c=n[0]-t[0])*c+(c=n[1]-t[1])*c,f=m&&Math.sqrt(c/m);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+r[0])/2,(e[1]+r[1])/2],i(f*p)}b=null,o(t,e),l(g)}function u(){if(ca.event.touches.length){for(var e=ca.event.changedTouches,n=0,r=e.length;r>n;++n)delete v[e[n].identifier];for(var i in v)return void t()}ca.selectAll(k).on(y,null),M.on(A,f).on(L,h),E(),c(g)}var p,d=this,g=D.of(d,arguments),v={},m=0,y=".zoom-"+ca.event.changedTouches[0].identifier,x="touchmove"+y,w="touchend"+y,k=[],M=ca.select(d),E=Q(d);n(),s(g),M.on(A,null).on(L,n)}function p(){var t=D.of(this,arguments);y?clearTimeout(y):(Us.call(this),g=e(v=m||ca.mouse(this)),s(t)),y=setTimeout(function(){y=null,c(t)},50),C(),i(Math.pow(2,.002*Za())*_.k),o(v,g),l(t)}function d(){var t=ca.mouse(this),n=Math.log(_.k)/Math.LN2;a(this,t,e(t),ca.event.shiftKey?Math.ceil(n)-1:Math.floor(n)+1)}var g,v,m,y,b,x,w,k,M,_={x:0,y:0,k:1},E=[960,500],S=Ka,N=250,O=0,A="mousedown.zoom",j="mousemove.zoom",P="mouseup.zoom",L="touchstart.zoom",D=T(t,"zoomstart","zoom","zoomend");return Qa||(Qa="onwheel"in pa?(Za=function(){return-ca.event.deltaY*(ca.event.deltaMode?120:1)},"wheel"):"onmousewheel"in pa?(Za=function(){return ca.event.wheelDelta},"mousewheel"):(Za=function(){return-ca.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=D.of(this,arguments),e=_;Hs?ca.select(this).transition().each("start.zoom",function(){_=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var n=E[0],r=E[1],i=v?v[0]:n/2,o=v?v[1]:r/2,a=ca.interpolateZoom([(i-_.x)/_.k,(o-_.y)/_.k,n/_.k],[(i-e.x)/e.k,(o-e.y)/e.k,n/e.k]);return function(e){var r=a(e),u=n/r[2];this.__chart__=_={x:i-r[0]*u,y:o-r[1]*u,k:u},l(t)}}).each("interrupt.zoom",function(){c(t)}).each("end.zoom",function(){c(t)}):(this.__chart__=_,s(t),l(t),c(t))})},t.translate=function(e){return arguments.length?(_={x:+e[0],y:+e[1],k:_.k},u(),t):[_.x,_.y]},t.scale=function(e){return arguments.length?(_={x:_.x,y:_.y,k:null},i(+e),u(),t):_.k},t.scaleExtent=function(e){return arguments.length?(S=null==e?Ka:[+e[0],+e[1]],t):S},t.center=function(e){return arguments.length?(m=e&&[+e[0],+e[1]],t):m},t.size=function(e){return arguments.length?(E=e&&[+e[0],+e[1]],t):E},t.duration=function(e){return arguments.length?(N=+e,t):N},t.x=function(e){return arguments.length?(w=e,x=e.copy(),_={x:0,y:0,k:1},t):w},t.y=function(e){return arguments.length?(M=e,k=e.copy(),_={x:0,y:0,k:1},t):M},ca.rebind(t,D,"on")};var Za,Qa,Ka=[0,1/0];ca.color=st,st.prototype.toString=function(){return this.rgb()+""},ca.hsl=lt;var Ja=lt.prototype=new st;Ja.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new lt(this.h,this.s,this.l/t)},Ja.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new lt(this.h,this.s,t*this.l)},Ja.rgb=function(){return ct(this.h,this.s,this.l)},ca.hcl=ft;var tu=ft.prototype=new st;tu.brighter=function(t){return new ft(this.h,this.c,Math.min(100,this.l+eu*(arguments.length?t:1)))},tu.darker=function(t){return new ft(this.h,this.c,Math.max(0,this.l-eu*(arguments.length?t:1)))},tu.rgb=function(){return ht(this.h,this.c,this.l).rgb()},ca.lab=pt;var eu=18,nu=.95047,ru=1,iu=1.08883,ou=pt.prototype=new st;ou.brighter=function(t){return new pt(Math.min(100,this.l+eu*(arguments.length?t:1)),this.a,this.b)},ou.darker=function(t){return new pt(Math.max(0,this.l-eu*(arguments.length?t:1)),this.a,this.b)},ou.rgb=function(){return dt(this.l,this.a,this.b)},ca.rgb=bt;var au=bt.prototype=new st;au.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new bt(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new bt(i,i,i)},au.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new bt(t*this.r,t*this.g,t*this.b)},au.hsl=function(){return _t(this.r,this.g,this.b)},au.toString=function(){return"#"+kt(this.r)+kt(this.g)+kt(this.b)};var uu=ca.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});uu.forEach(function(t,e){uu.set(t,xt(e))}),ca.functor=Tt,ca.xhr=Nt(x),ca.dsv=function(t,e){function n(t,n,o){arguments.length<3&&(o=n,n=null);var a=Ot(t,e,null==n?r:i(n),o);return a.row=function(t){return arguments.length?a.response(null==(n=t)?r:i(t)):n},a}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function o(e){return e.map(a).join(t)}function a(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(c>=l)return a;if(i)return i=!1,o;var e=c;if(34===t.charCodeAt(e)){for(var n=e;n++<l;)if(34===t.charCodeAt(n)){if(34!==t.charCodeAt(n+1))break;++n}c=n+2;var r=t.charCodeAt(n+1);return 13===r?(i=!0,10===t.charCodeAt(n+2)&&++c):10===r&&(i=!0),t.slice(e+1,n).replace(/""/g,'"')}for(;l>c;){var r=t.charCodeAt(c++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(c)&&(++c,++u);else if(r!==s)continue;return t.slice(e,c-u)}return t.slice(e)}for(var r,i,o={},a={},u=[],l=t.length,c=0,f=0;(r=n())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=n();e&&null==(h=e(h,f++))||u.push(h)}return u},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new b,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(a).join(t)].concat(e.map(function(e){return i.map(function(t){return a(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(o).join("\n")},n},ca.csv=ca.dsv(",","text/csv"),ca.tsv=ca.dsv("	","text/tab-separated-values");var su,lu,cu,fu,hu=this[k(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};ca.timer=function(){Pt.apply(this,arguments)},ca.timer.flush=function(){Dt(),Rt()},ca.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var pu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(qt);ca.formatPrefix=function(t,e){var n=0;return(t=+t)&&(0>t&&(t*=-1),e&&(t=ca.round(t,It(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),pu[8+n/3]};var du=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,gu=ca.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=ca.round(t,It(t,e))).toFixed(Math.max(0,Math.min(20,It(t*(1+1e-15),e))))}}),vu=ca.time={},mu=Date;zt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){yu.setUTCDate.apply(this._,arguments)},setDay:function(){yu.setUTCDay.apply(this._,arguments)},setFullYear:function(){yu.setUTCFullYear.apply(this._,arguments)},setHours:function(){yu.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){yu.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){yu.setUTCMinutes.apply(this._,arguments)},setMonth:function(){yu.setUTCMonth.apply(this._,arguments)},setSeconds:function(){yu.setUTCSeconds.apply(this._,arguments)},setTime:function(){yu.setTime.apply(this._,arguments)}};var yu=Date.prototype;vu.year=Ht(function(t){return t=vu.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),vu.years=vu.year.range,vu.years.utc=vu.year.utc.range,vu.day=Ht(function(t){var e=new mu(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),vu.days=vu.day.range,vu.days.utc=vu.day.utc.range,vu.dayOfYear=function(t){var e=vu.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=vu[t]=Ht(function(t){return(t=vu.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=vu.year(t).getDay();return Math.floor((vu.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});vu[t+"s"]=n.range,vu[t+"s"].utc=n.utc.range,vu[t+"OfYear"]=function(t){var n=vu.year(t).getDay();return Math.floor((vu.dayOfYear(t)+(n+e)%7)/7)}}),vu.week=vu.sunday,vu.weeks=vu.sunday.range,vu.weeks.utc=vu.sunday.utc.range,vu.weekOfYear=vu.sundayOfYear;var bu={"-":"",_:" ",0:"0"},xu=/^\s*\d+/,wu=/^%/;ca.locale=function(t){return{numberFormat:Ft(t),timeFormat:Ut(t)}};var ku=ca.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ca.format=ku.numberFormat,ca.geo={},fe.prototype={s:0,t:0,add:function(t){he(t,this.t,Mu),he(Mu.s,this.s,this),this.s?this.t+=Mu.t:this.s=Mu.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var Mu=new fe;ca.geo.stream=function(t,e){t&&_u.hasOwnProperty(t.type)?_u[t.type](t,e):pe(t,e)};var _u={Feature:function(t,e){pe(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)pe(n[r].geometry,e)}},Eu={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){de(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)de(n[r],e,0)},Polygon:function(t,e){ge(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)ge(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)pe(n[r],e)}};ca.geo.area=function(t){return Cu=0,ca.geo.stream(t,Tu),Cu};var Cu,Su=new fe,Tu={sphere:function(){Cu+=4*za},point:M,lineStart:M,lineEnd:M,polygonStart:function(){Su.reset(),Tu.lineStart=ve},polygonEnd:function(){var t=2*Su;Cu+=0>t?4*za+t:t,Tu.lineStart=Tu.lineEnd=Tu.point=M}};ca.geo.bounds=function(){function t(t,e){b.push(x=[c=t,h=t]),f>e&&(f=e),e>p&&(p=e)}function e(e,n){var r=me([e*$a,n*$a]);if(m){var i=be(m,r),o=[i[1],-i[0],0],a=be(o,i);ke(a),a=Me(a);var s=e-d,l=s>0?1:-1,g=a[0]*Va*l,v=ka(s)>180;if(v^(g>l*d&&l*e>g)){var y=a[1]*Va;y>p&&(p=y)}else if(g=(g+360)%360-180,v^(g>l*d&&l*e>g)){var y=-a[1]*Va;f>y&&(f=y)}else f>n&&(f=n),n>p&&(p=n);v?d>e?u(c,e)>u(c,h)&&(h=e):u(e,h)>u(c,h)&&(c=e):h>=c?(c>e&&(c=e),e>h&&(h=e)):e>d?u(c,e)>u(c,h)&&(h=e):u(e,h)>u(c,h)&&(c=e)}else t(e,n);m=r,d=e}function n(){w.point=e}function r(){x[0]=c,x[1]=h,w.point=t,m=null}function i(t,n){if(m){var r=t-d;y+=ka(r)>180?r+(r>0?360:-360):r}else g=t,v=n;Tu.point(t,n),e(t,n)}function o(){Tu.lineStart()}function a(){i(g,v),Tu.lineEnd(),ka(y)>Fa&&(c=-(h=180)),x[0]=c,x[1]=h,m=null}function u(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function l(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}var c,f,h,p,d,g,v,m,y,b,x,w={point:t,lineStart:n,lineEnd:r,polygonStart:function(){w.point=i,w.lineStart=o,w.lineEnd=a,y=0,Tu.polygonStart()},polygonEnd:function(){Tu.polygonEnd(),w.point=t,w.lineStart=n,w.lineEnd=r,0>Su?(c=-(h=180),f=-(p=90)):y>Fa?p=90:-Fa>y&&(f=-90),x[0]=c,x[1]=h}};return function(t){p=h=-(c=f=1/0),b=[],ca.geo.stream(t,w);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],o=[i];e>r;++r)n=b[r],l(n[0],i)||l(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(var a,n,d=-(1/0),e=o.length-1,r=0,i=o[e];e>=r;i=n,++r)n=o[r],(a=u(i[1],n[0]))>d&&(d=a,c=n[0],h=i[1])}return b=x=null,c===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[c,f],[h,p]]}}(),ca.geo.centroid=function(t){Nu=Ou=Au=ju=Pu=Lu=Du=Ru=Iu=qu=Fu=0,ca.geo.stream(t,Bu);var e=Iu,n=qu,r=Fu,i=e*e+n*n+r*r;return Ba>i&&(e=Lu,n=Du,r=Ru,Fa>Ou&&(e=Au,n=ju,r=Pu),i=e*e+n*n+r*r,Ba>i)?[NaN,NaN]:[Math.atan2(n,e)*Va,rt(r/Math.sqrt(i))*Va]};var Nu,Ou,Au,ju,Pu,Lu,Du,Ru,Iu,qu,Fu,Bu={sphere:M,point:Ee,lineStart:Se,lineEnd:Te,polygonStart:function(){Bu.lineStart=Ne},polygonEnd:function(){Bu.lineStart=Se}},zu=De(Ae,Fe,ze,[-za,-za/2]),Hu=1e9;ca.geo.clipExtent=function(){var t,e,n,r,i,o,a={stream:function(t){return i&&(i.valid=!1),i=o(t),i.valid=!0,i},extent:function(u){return arguments.length?(o=$e(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),a):[[t,e],[n,r]]}};return a.extent([[0,0],[960,500]])},(ca.geo.conicEqualArea=function(){return Ve(Xe)}).raw=Xe,ca.geo.albers=function(){return ca.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},ca.geo.albersUsa=function(){function t(t){var o=t[0],a=t[1];return e=null,n(o,a),e||(r(o,a),e)||i(o,a),e}var e,n,r,i,o=ca.geo.albers(),a=ca.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=ca.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?a:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:o).invert(t)},t.stream=function(t){var e=o.stream(t),n=a.stream(t),r=u.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(o.precision(e),a.precision(e),u.precision(e),t):o.precision()},t.scale=function(e){return arguments.length?(o.scale(e),a.scale(.35*e),u.scale(e),t.translate(o.translate())):o.scale()},t.translate=function(e){if(!arguments.length)return o.translate();var l=o.scale(),c=+e[0],f=+e[1];return n=o.translate(e).clipExtent([[c-.455*l,f-.238*l],[c+.455*l,f+.238*l]]).stream(s).point,r=a.translate([c-.307*l,f+.201*l]).clipExtent([[c-.425*l+Fa,f+.12*l+Fa],[c-.214*l-Fa,f+.234*l-Fa]]).stream(s).point,i=u.translate([c-.205*l,f+.212*l]).clipExtent([[c-.214*l+Fa,f+.166*l+Fa],[c-.115*l-Fa,f+.234*l-Fa]]).stream(s).point,t},t.scale(1070)};var Wu,Uu,$u,Vu,Xu,Yu,Gu={point:M,lineStart:M,lineEnd:M,polygonStart:function(){Uu=0,Gu.lineStart=Ye},polygonEnd:function(){Gu.lineStart=Gu.lineEnd=Gu.point=M,Wu+=ka(Uu/2)}},Zu={point:Ge,lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M},Qu={point:Ke,lineStart:Je,lineEnd:tn,polygonStart:function(){Qu.lineStart=en},polygonEnd:function(){Qu.point=Ke,Qu.lineStart=Je,Qu.lineEnd=tn}};ca.geo.path=function(){function t(t){return t&&("function"==typeof u&&o.pointRadius(+u.apply(this,arguments)),a&&a.valid||(a=i(o)),ca.geo.stream(t,a)),o.result()}function e(){return a=null,t}var n,r,i,o,a,u=4.5;return t.area=function(t){return Wu=0,ca.geo.stream(t,i(Gu)),Wu},t.centroid=function(t){return Au=ju=Pu=Lu=Du=Ru=Iu=qu=Fu=0,ca.geo.stream(t,i(Qu)),Fu?[Iu/Fu,qu/Fu]:Ru?[Lu/Ru,Du/Ru]:Pu?[Au/Pu,ju/Pu]:[NaN,NaN]},t.bounds=function(t){return Xu=Yu=-($u=Vu=1/0),ca.geo.stream(t,i(Zu)),[[$u,Vu],[Xu,Yu]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||on(t):x,e()):n},t.context=function(t){return arguments.length?(o=null==(r=t)?new Ze:new nn(t),"function"!=typeof u&&o.pointRadius(u),e()):r},t.pointRadius=function(e){return arguments.length?(u="function"==typeof e?e:(o.pointRadius(+e),+e),t):u},t.projection(ca.geo.albersUsa()).context(null)},ca.geo.transform=function(t){return{stream:function(e){var n=new an(e);for(var r in t)n[r]=t[r];return n}}},an.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ca.geo.projection=sn,ca.geo.projectionMutator=ln,(ca.geo.equirectangular=function(){return sn(fn)}).raw=fn.invert=fn,ca.geo.rotation=function(t){function e(e){return e=t(e[0]*$a,e[1]*$a),e[0]*=Va,e[1]*=Va,e}return t=pn(t[0]%360*$a,t[1]*$a,t.length>2?t[2]*$a:0),e.invert=function(e){return e=t.invert(e[0]*$a,e[1]*$a),e[0]*=Va,e[1]*=Va,e},e},hn.invert=fn,ca.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=pn(-t[0]*$a,-t[1]*$a,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Va,t[1]*=Va}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=mn((e=+r)*$a,i*$a),t):e},t.precision=function(r){return arguments.length?(n=mn(e*$a,(i=+r)*$a),t):i},t.angle(90)},ca.geo.distance=function(t,e){var n,r=(e[0]-t[0])*$a,i=t[1]*$a,o=e[1]*$a,a=Math.sin(r),u=Math.cos(r),s=Math.sin(i),l=Math.cos(i),c=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((n=f*a)*n+(n=l*c-s*f*u)*n),s*c+l*f*u)},ca.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return ca.range(Math.ceil(o/v)*v,i,v).map(h).concat(ca.range(Math.ceil(l/m)*m,s,m).map(p)).concat(ca.range(Math.ceil(r/d)*d,n,d).filter(function(t){return ka(t%v)>Fa}).map(c)).concat(ca.range(Math.ceil(u/g)*g,a,g).filter(function(t){return ka(t%m)>Fa}).map(f))}var n,r,i,o,a,u,s,l,c,f,h,p,d=10,g=d,v=90,m=360,y=2.5;
return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(s).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(o=+e[0][0],i=+e[1][0],l=+e[0][1],s=+e[1][1],o>i&&(e=o,o=i,i=e),l>s&&(e=l,l=s,s=e),t.precision(y)):[[o,l],[i,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),u>a&&(e=u,u=a,a=e),t.precision(y)):[[r,u],[n,a]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(v=+e[0],m=+e[1],t):[v,m]},t.minorStep=function(e){return arguments.length?(d=+e[0],g=+e[1],t):[d,g]},t.precision=function(e){return arguments.length?(y=+e,c=bn(u,a,90),f=xn(r,n,y),h=bn(l,s,90),p=xn(o,i,y),t):y},t.majorExtent([[-180,-90+Fa],[180,90-Fa]]).minorExtent([[-180,-80-Fa],[180,80+Fa]])},ca.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=wn,i=kn;return t.distance=function(){return ca.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},ca.geo.interpolate=function(t,e){return Mn(t[0]*$a,t[1]*$a,e[0]*$a,e[1]*$a)},ca.geo.length=function(t){return Ku=0,ca.geo.stream(t,Ju),Ku};var Ku,Ju={sphere:M,point:M,lineStart:_n,lineEnd:M,polygonStart:M,polygonEnd:M},ts=En(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ca.geo.azimuthalEqualArea=function(){return sn(ts)}).raw=ts;var es=En(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},x);(ca.geo.azimuthalEquidistant=function(){return sn(es)}).raw=es,(ca.geo.conicConformal=function(){return Ve(Cn)}).raw=Cn,(ca.geo.conicEquidistant=function(){return Ve(Sn)}).raw=Sn;var ns=En(function(t){return 1/t},Math.atan);(ca.geo.gnomonic=function(){return sn(ns)}).raw=ns,Tn.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Ua]},(ca.geo.mercator=function(){return Nn(Tn)}).raw=Tn;var rs=En(function(){return 1},Math.asin);(ca.geo.orthographic=function(){return sn(rs)}).raw=rs;var is=En(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ca.geo.stereographic=function(){return sn(is)}).raw=is,On.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Ua]},(ca.geo.transverseMercator=function(){var t=Nn(On),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=On,ca.geom={},ca.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=Tt(n),o=Tt(r),a=t.length,u=[],s=[];for(e=0;a>e;e++)u.push([+i.call(this,t[e],e),+o.call(this,t[e],e),e]);for(u.sort(Ln),e=0;a>e;e++)s.push([u[e][0],-u[e][1]]);var l=Pn(u),c=Pn(s),f=c[0]===l[0],h=c[c.length-1]===l[l.length-1],p=[];for(e=l.length-1;e>=0;--e)p.push(t[u[l[e]][2]]);for(e=+f;e<c.length-h;++e)p.push(t[u[c[e]][2]]);return p}var n=An,r=jn;return arguments.length?e(t):(e.x=function(t){return arguments.length?(n=t,e):n},e.y=function(t){return arguments.length?(r=t,e):r},e)},ca.geom.polygon=function(t){return Sa(t,os),t};var os=ca.geom.polygon.prototype=[];os.area=function(){for(var t,e=-1,n=this.length,r=this[n-1],i=0;++e<n;)t=r,r=this[e],i+=t[1]*r[0]-t[0]*r[1];return.5*i},os.centroid=function(t){var e,n,r=-1,i=this.length,o=0,a=0,u=this[i-1];for(arguments.length||(t=-1/(6*this.area()));++r<i;)e=u,u=this[r],n=e[0]*u[1]-u[0]*e[1],o+=(e[0]+u[0])*n,a+=(e[1]+u[1])*n;return[o*t,a*t]},os.clip=function(t){for(var e,n,r,i,o,a,u=In(t),s=-1,l=this.length-In(this),c=this[l-1];++s<l;){for(e=t.slice(),t.length=0,i=this[s],o=e[(r=e.length-u)-1],n=-1;++n<r;)a=e[n],Dn(a,c,i)?(Dn(o,c,i)||t.push(Rn(o,a,c,i)),t.push(a)):Dn(o,c,i)&&t.push(Rn(o,a,c,i)),o=a;u&&t.push(t[0]),c=i}return t};var as,us,ss,ls,cs,fs=[],hs=[];$n.prototype.prepare=function(){for(var t,e=this.edges,n=e.length;n--;)t=e[n].edge,t.b&&t.a||e.splice(n,1);return e.sort(Xn),e.length},rr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},ir.prototype={insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=sr(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)r=n.U,n===r.L?(i=r.R,i&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(ar(this,n),t=n,n=t.U),n.C=!1,r.C=!0,ur(this,r))):(i=r.L,i&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(ur(this,n),t=n,n=t.U),n.C=!1,r.C=!0,ar(this,r))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?sr(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(e=i.R,e.C&&(e.C=!1,i.C=!0,ar(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,ur(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,ar(this,i),t=this._;break}}else if(e=i.L,e.C&&(e.C=!1,i.C=!0,ur(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,ar(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,ur(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}},ca.geom.voronoi=function(t){function e(t){var e=new Array(t.length),r=u[0][0],i=u[0][1],o=u[1][0],a=u[1][1];return lr(n(t),u).cells.forEach(function(n,u){var s=n.edges,l=n.site,c=e[u]=s.length?s.map(function(t){var e=t.start();return[e.x,e.y]}):l.x>=r&&l.x<=o&&l.y>=i&&l.y<=a?[[r,a],[o,a],[o,i],[r,i]]:[];c.point=t[u]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(o(t,e)/Fa)*Fa,y:Math.round(a(t,e)/Fa)*Fa,i:e}})}var r=An,i=jn,o=r,a=i,u=ps;return t?e(t):(e.links=function(t){return lr(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return lr(n(t)).cells.forEach(function(n,r){for(var i,o,a=n.site,u=n.edges.sort(Xn),s=-1,l=u.length,c=u[l-1].edge,f=c.l===a?c.r:c.l;++s<l;)i=c,o=f,c=u[s].edge,f=c.l===a?c.r:c.l,r<o.i&&r<f.i&&fr(a,o,f)<0&&e.push([t[r],t[o.i],t[f.i]])}),e},e.x=function(t){return arguments.length?(o=Tt(r=t),e):r},e.y=function(t){return arguments.length?(a=Tt(i=t),e):i},e.clipExtent=function(t){return arguments.length?(u=null==t?ps:t,e):u===ps?null:u},e.size=function(t){return arguments.length?e.clipExtent(t&&[[0,0],t]):u===ps?null:u&&u[1]},e)};var ps=[[-1e6,-1e6],[1e6,1e6]];ca.geom.delaunay=function(t){return ca.geom.voronoi().triangles(t)},ca.geom.quadtree=function(t,e,n,r,i){function o(t){function o(t,e,n,r,i,o,a,u){if(!isNaN(n)&&!isNaN(r))if(t.leaf){var s=t.x,c=t.y;if(null!=s)if(ka(s-n)+ka(c-r)<.01)l(t,e,n,r,i,o,a,u);else{var f=t.point;t.x=t.y=t.point=null,l(t,f,s,c,i,o,a,u),l(t,e,n,r,i,o,a,u)}else t.x=n,t.y=r,t.point=e}else l(t,e,n,r,i,o,a,u)}function l(t,e,n,r,i,a,u,s){var l=.5*(i+u),c=.5*(a+s),f=n>=l,h=r>=c,p=h<<1|f;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=dr()),f?i=l:u=l,h?a=c:s=c,o(t,e,n,r,i,a,u,s)}var c,f,h,p,d,g,v,m,y,b=Tt(u),x=Tt(s);if(null!=e)g=e,v=n,m=r,y=i;else if(m=y=-(g=v=1/0),f=[],h=[],d=t.length,a)for(p=0;d>p;++p)c=t[p],c.x<g&&(g=c.x),c.y<v&&(v=c.y),c.x>m&&(m=c.x),c.y>y&&(y=c.y),f.push(c.x),h.push(c.y);else for(p=0;d>p;++p){var w=+b(c=t[p],p),k=+x(c,p);g>w&&(g=w),v>k&&(v=k),w>m&&(m=w),k>y&&(y=k),f.push(w),h.push(k)}var M=m-g,_=y-v;M>_?y=v+M:m=g+_;var E=dr();if(E.add=function(t){o(E,t,+b(t,++p),+x(t,p),g,v,m,y)},E.visit=function(t){gr(t,E,g,v,m,y)},E.find=function(t){return vr(E,t[0],t[1],g,v,m,y)},p=-1,null==e){for(;++p<d;)o(E,t[p],f[p],h[p],g,v,m,y);--p}else t.forEach(E.add);return f=h=t=c=null,E}var a,u=An,s=jn;return(a=arguments.length)?(u=hr,s=pr,3===a&&(i=n,r=e,n=e=0),o(t)):(o.x=function(t){return arguments.length?(u=t,o):u},o.y=function(t){return arguments.length?(s=t,o):s},o.extent=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),o):null==e?null:[[e,n],[r,i]]},o.size=function(t){return arguments.length?(null==t?e=n=r=i=null:(e=n=0,r=+t[0],i=+t[1]),o):null==e?null:[r-e,i-n]},o)},ca.interpolateRgb=mr,ca.interpolateObject=yr,ca.interpolateNumber=br,ca.interpolateString=xr;var ds=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gs=new RegExp(ds.source,"g");ca.interpolate=wr,ca.interpolators=[function(t,e){var n=typeof e;return("string"===n?uu.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?mr:xr:e instanceof st?mr:Array.isArray(e)?kr:"object"===n&&isNaN(e)?yr:br)(t,e)}],ca.interpolateArray=kr;var vs=function(){return x},ms=ca.map({linear:vs,poly:Nr,quad:function(){return Cr},cubic:function(){return Sr},sin:function(){return Or},exp:function(){return Ar},circle:function(){return jr},elastic:Pr,back:Lr,bounce:function(){return Dr}}),ys=ca.map({"in":x,out:_r,"in-out":Er,"out-in":function(t){return Er(_r(t))}});ca.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=ms.get(n)||vs,r=ys.get(r)||x,Mr(r(n.apply(null,fa.call(arguments,1))))},ca.interpolateHcl=Rr,ca.interpolateHsl=Ir,ca.interpolateLab=qr,ca.interpolateRound=Fr,ca.transform=function(t){var e=pa.createElementNS(ca.ns.prefix.svg,"g");return(ca.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new Br(n?n.matrix:bs)})(t)},Br.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var bs={a:1,b:0,c:0,d:1,e:0,f:0};ca.interpolateTransform=Gr,ca.layout={},ca.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(Kr(t[n]));return e}},ca.layout.chord=function(){function t(){var t,l,f,h,p,d={},g=[],v=ca.range(o),m=[];for(n=[],r=[],t=0,h=-1;++h<o;){for(l=0,p=-1;++p<o;)l+=i[h][p];g.push(l),m.push(ca.range(o)),t+=l}for(a&&v.sort(function(t,e){return a(g[t],g[e])}),u&&m.forEach(function(t,e){t.sort(function(t,n){return u(i[e][t],i[e][n])})}),t=(Ha-c*o)/t,l=0,h=-1;++h<o;){for(f=l,p=-1;++p<o;){var y=v[h],b=m[y][p],x=i[y][b],w=l,k=l+=x*t;d[y+"-"+b]={index:y,subindex:b,startAngle:w,endAngle:k,value:x}}r[y]={index:y,startAngle:f,endAngle:l,value:g[y]},l+=c}for(h=-1;++h<o;)for(p=h-1;++p<o;){var M=d[h+"-"+p],_=d[p+"-"+h];(M.value||_.value)&&n.push(M.value<_.value?{source:_,target:M}:{source:M,target:_})}s&&e()}function e(){n.sort(function(t,e){return s((t.source.value+t.target.value)/2,(e.source.value+e.target.value)/2)})}var n,r,i,o,a,u,s,l={},c=0;return l.matrix=function(t){return arguments.length?(o=(i=t)&&i.length,n=r=null,l):i},l.padding=function(t){return arguments.length?(c=t,n=r=null,l):c},l.sortGroups=function(t){return arguments.length?(a=t,n=r=null,l):a},l.sortSubgroups=function(t){return arguments.length?(u=t,n=null,l):u},l.sortChords=function(t){return arguments.length?(s=t,n&&e(),l):s},l.chords=function(){return n||t(),n},l.groups=function(){return r||t(),r},l},ca.layout.force=function(){function t(t){return function(e,n,r,i){if(e.point!==t){var o=e.cx-t.x,a=e.cy-t.y,u=i-n,s=o*o+a*a;if(s>u*u/m){if(g>s){var l=e.charge/s;t.px-=o*l,t.py-=a*l}return!0}if(e.point&&s&&g>s){var l=e.pointCharge/s;t.px-=o*l,t.py-=a*l}}return!e.charge}}function e(t){t.px=ca.event.x,t.py=ca.event.y,s.resume()}var n,r,i,o,a,u,s={},l=ca.dispatch("start","tick","end"),c=[1,1],f=.9,h=xs,p=ws,d=-30,g=ks,v=.1,m=.64,y=[],b=[];return s.tick=function(){if((i*=.99)<.005)return n=null,l.end({type:"end",alpha:i=0}),!0;var e,r,s,h,p,g,m,x,w,k=y.length,M=b.length;for(r=0;M>r;++r)s=b[r],h=s.source,p=s.target,x=p.x-h.x,w=p.y-h.y,(g=x*x+w*w)&&(g=i*a[r]*((g=Math.sqrt(g))-o[r])/g,x*=g,w*=g,p.x-=x*(m=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=w*m,h.x+=x*(m=1-m),h.y+=w*m);if((m=i*v)&&(x=c[0]/2,w=c[1]/2,r=-1,m))for(;++r<k;)s=y[r],s.x+=(x-s.x)*m,s.y+=(w-s.y)*m;if(d)for(oi(e=ca.geom.quadtree(y),i,u),r=-1;++r<k;)(s=y[r]).fixed||e.visit(t(s));for(r=-1;++r<k;)s=y[r],s.fixed?(s.x=s.px,s.y=s.py):(s.x-=(s.px-(s.px=s.x))*f,s.y-=(s.py-(s.py=s.y))*f);l.tick({type:"tick",alpha:i})},s.nodes=function(t){return arguments.length?(y=t,s):y},s.links=function(t){return arguments.length?(b=t,s):b},s.size=function(t){return arguments.length?(c=t,s):c},s.linkDistance=function(t){return arguments.length?(h="function"==typeof t?t:+t,s):h},s.distance=s.linkDistance,s.linkStrength=function(t){return arguments.length?(p="function"==typeof t?t:+t,s):p},s.friction=function(t){return arguments.length?(f=+t,s):f},s.charge=function(t){return arguments.length?(d="function"==typeof t?t:+t,s):d},s.chargeDistance=function(t){return arguments.length?(g=t*t,s):Math.sqrt(g)},s.gravity=function(t){return arguments.length?(v=+t,s):v},s.theta=function(t){return arguments.length?(m=t*t,s):Math.sqrt(m)},s.alpha=function(t){return arguments.length?(t=+t,i?t>0?i=t:(n.c=null,n.t=NaN,n=null,l.end({type:"end",alpha:i=0})):t>0&&(l.start({type:"start",alpha:i=t}),n=Pt(s.tick)),s):i},s.start=function(){function t(t,r){if(!n){for(n=new Array(i),s=0;i>s;++s)n[s]=[];for(s=0;l>s;++s){var o=b[s];n[o.source.index].push(o.target),n[o.target.index].push(o.source)}}for(var a,u=n[e],s=-1,c=u.length;++s<c;)if(!isNaN(a=u[s][t]))return a;return Math.random()*r}var e,n,r,i=y.length,l=b.length,f=c[0],g=c[1];for(e=0;i>e;++e)(r=y[e]).index=e,r.weight=0;for(e=0;l>e;++e)r=b[e],"number"==typeof r.source&&(r.source=y[r.source]),"number"==typeof r.target&&(r.target=y[r.target]),++r.source.weight,++r.target.weight;for(e=0;i>e;++e)r=y[e],isNaN(r.x)&&(r.x=t("x",f)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(e=0;l>e;++e)o[e]=+h.call(this,b[e],e);else for(e=0;l>e;++e)o[e]=h;if(a=[],"function"==typeof p)for(e=0;l>e;++e)a[e]=+p.call(this,b[e],e);else for(e=0;l>e;++e)a[e]=p;if(u=[],"function"==typeof d)for(e=0;i>e;++e)u[e]=+d.call(this,y[e],e);else for(e=0;i>e;++e)u[e]=d;return s.resume()},s.resume=function(){return s.alpha(.1)},s.stop=function(){return s.alpha(0)},s.drag=function(){return r||(r=ca.behavior.drag().origin(x).on("dragstart.force",ei).on("drag.force",e).on("dragend.force",ni)),arguments.length?void this.on("mouseover.force",ri).on("mouseout.force",ii).call(r):r},ca.rebind(s,l,"on")};var xs=20,ws=1,ks=1/0;ca.layout.hierarchy=function(){function t(i){var o,a=[i],u=[];for(i.depth=0;null!=(o=a.pop());)if(u.push(o),(l=n.call(t,o,o.depth))&&(s=l.length)){for(var s,l,c;--s>=0;)a.push(c=l[s]),c.parent=o,c.depth=o.depth+1;r&&(o.value=0),o.children=l}else r&&(o.value=+r.call(t,o,o.depth)||0),delete o.children;return si(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}var e=fi,n=li,r=ci;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(ui(e,function(t){t.children&&(t.value=0)}),si(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},ca.layout.partition=function(){function t(e,n,r,i){var o=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,u,s,l=-1;for(r=e.value?r/e.value:0;++l<a;)t(u=o[l],n,s=u.value*r,i),n+=s}}function e(t){var n=t.children,r=0;if(n&&(i=n.length))for(var i,o=-1;++o<i;)r=Math.max(r,e(n[o]));return 1+r}function n(n,o){var a=r.call(this,n,o);return t(a[0],0,i[0],i[1]/e(a[0])),a}var r=ca.layout.hierarchy(),i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},ai(n,r)},ca.layout.pie=function(){function t(a){var u,s=a.length,l=a.map(function(n,r){return+e.call(t,n,r)}),c=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof i?i.apply(this,arguments):i)-c,h=Math.min(Math.abs(f)/s,+("function"==typeof o?o.apply(this,arguments):o)),p=h*(0>f?-1:1),d=ca.sum(l),g=d?(f-s*p)/d:0,v=ca.range(s),m=[];return null!=n&&v.sort(n===Ms?function(t,e){return l[e]-l[t]}:function(t,e){return n(a[t],a[e])}),v.forEach(function(t){m[t]={data:a[t],value:u=l[t],startAngle:c,endAngle:c+=u*g+p,padAngle:h}}),m}var e=Number,n=Ms,r=0,i=Ha,o=0;return t.value=function(n){return arguments.length?(e=n,t):e},t.sort=function(e){return arguments.length?(n=e,t):n},t.startAngle=function(e){return arguments.length?(r=e,t):r},t.endAngle=function(e){return arguments.length?(i=e,t):i},t.padAngle=function(e){return arguments.length?(o=e,t):o},t};var Ms={};ca.layout.stack=function(){function t(u,s){if(!(h=u.length))return u;var l=u.map(function(n,r){return e.call(t,n,r)}),c=l.map(function(e){return e.map(function(e,n){return[o.call(t,e,n),a.call(t,e,n)]})}),f=n.call(t,c,s);l=ca.permute(l,f),c=ca.permute(c,f);var h,p,d,g,v=r.call(t,c,s),m=l[0].length;for(d=0;m>d;++d)for(i.call(t,l[0][d],g=v[d],c[0][d][1]),p=1;h>p;++p)i.call(t,l[p][d],g+=c[p-1][d][1],c[p][d][1]);return u}var e=x,n=vi,r=mi,i=gi,o=pi,a=di;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:_s.get(e)||vi,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:Es.get(e)||mi,t):r},t.x=function(e){return arguments.length?(o=e,t):o},t.y=function(e){return arguments.length?(a=e,t):a},t.out=function(e){return arguments.length?(i=e,t):i},t};var _s=ca.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(yi),o=t.map(bi),a=ca.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,s=0,l=[],c=[];for(e=0;r>e;++e)n=a[e],s>u?(u+=o[n],l.push(n)):(s+=o[n],c.push(n));return c.reverse().concat(l)},reverse:function(t){return ca.range(t.length).reverse()},"default":vi}),Es=ca.map({silhouette:function(t){var e,n,r,i=t.length,o=t[0].length,a=[],u=0,s=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>u&&(u=r),a.push(r)}for(n=0;o>n;++n)s[n]=(u-a[n])/2;return s},wiggle:function(t){var e,n,r,i,o,a,u,s,l,c=t.length,f=t[0],h=f.length,p=[];for(p[0]=s=l=0,n=1;h>n;++n){for(e=0,i=0;c>e;++e)i+=t[e][n][1];for(e=0,o=0,u=f[n][0]-f[n-1][0];c>e;++e){for(r=0,a=(t[e][n][1]-t[e][n-1][1])/(2*u);e>r;++r)a+=(t[r][n][1]-t[r][n-1][1])/u;o+=a*t[e][n][1]}p[n]=s-=i?o/i*u:0,l>s&&(l=s)}for(n=0;h>n;++n)p[n]-=l;return p},expand:function(t){var e,n,r,i=t.length,o=t[0].length,a=1/i,u=[];for(n=0;o>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=a}for(n=0;o>n;++n)u[n]=0;return u},zero:mi});ca.layout.histogram=function(){function t(t,o){for(var a,u,s=[],l=t.map(n,this),c=r.call(this,l,o),f=i.call(this,c,l,o),o=-1,h=l.length,p=f.length-1,d=e?1:1/h;++o<p;)a=s[o]=[],a.dx=f[o+1]-(a.x=f[o]),a.y=0;if(p>0)for(o=-1;++o<h;)u=l[o],u>=c[0]&&u<=c[1]&&(a=s[ca.bisect(f,u,1,p)-1],a.y+=d,a.push(t[o]));return s}var e=!0,n=Number,r=Mi,i=wi;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=Tt(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return ki(t,e)}:Tt(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},ca.layout.pack=function(){function t(t,o){var a=n.call(this,t,o),u=a[0],s=i[0],l=i[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(u.x=u.y=0,si(u,function(t){t.r=+c(t.value)}),si(u,Ti),r){var f=r*(e?1:Math.max(2*u.r/s,2*u.r/l))/2;si(u,function(t){t.r+=f}),si(u,Ti),si(u,function(t){t.r-=f})}return Ai(u,s/2,l/2,e?1:1/Math.max(2*u.r/s,2*u.r/l)),a}var e,n=ca.layout.hierarchy().sort(_i),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},ai(t,n)},ca.layout.tree=function(){function t(t,i){var c=a.call(this,t,i),f=c[0],h=e(f);if(si(h,n),h.parent.m=-h.z,ui(h,r),l)ui(f,o);else{var p=f,d=f,g=f;ui(f,function(t){t.x<p.x&&(p=t),t.x>d.x&&(d=t),t.depth>g.depth&&(g=t)});var v=u(p,d)/2-p.x,m=s[0]/(d.x+u(d,p)/2+v),y=s[1]/(g.depth||1);ui(f,function(t){t.x=(t.x+v)*m,t.y=t.depth*y})}return c}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,o=e.children,a=0,u=o.length;u>a;++a)r.push((o[a]=i={_:o[a],parent:e,children:(i=o[a].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:a}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Ii(t);var o=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-o):t.z=o}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,o=t,a=e,s=i.parent.children[0],l=i.m,c=o.m,f=a.m,h=s.m;a=Di(a),i=Li(i),a&&i;)s=Li(s),o=Di(o),o.a=t,r=a.z+f-i.z-l+u(a._,i._),r>0&&(Ri(qi(a,t,n),t,r),l+=r,c+=r),f+=a.m,l+=i.m,h+=s.m,c+=o.m;a&&!Di(o)&&(o.t=a,o.m+=f-c),i&&!Li(s)&&(s.t=i,s.m+=l-h,n=t)}return n}function o(t){t.x*=s[0],t.y=t.depth*s[1]}var a=ca.layout.hierarchy().sort(null).value(null),u=Pi,s=[1,1],l=null;return t.separation=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(l=null==(s=e)?o:null,t):l?null:s},t.nodeSize=function(e){return arguments.length?(l=null==(s=e)?null:o,t):l?s:null},ai(t,a)},ca.layout.cluster=function(){function t(t,o){var a,u=e.call(this,t,o),s=u[0],l=0;si(s,function(t){var e=t.children;e&&e.length?(t.x=Bi(e),t.y=Fi(e)):(t.x=a?l+=n(t,a):0,t.y=0,a=t)});var c=zi(s),f=Hi(s),h=c.x-n(c,f)/2,p=f.x+n(f,c)/2;return si(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-h)/(p-h)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var e=ca.layout.hierarchy().sort(null).value(null),n=Pi,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},ai(t,e)},ca.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,o=t.length;++i<o;)r=(n=t[i]).value*(0>e?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var o=n.children;if(o&&o.length){var a,u,s,l=f(n),c=[],h=o.slice(),d=1/0,g="slice"===p?l.dx:"dice"===p?l.dy:"slice-dice"===p?1&n.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(h,l.dx*l.dy/n.value),c.area=0;(s=h.length)>0;)c.push(a=h[s-1]),c.area+=a.area,"squarify"!==p||(u=r(c,g))<=d?(h.pop(),d=u):(c.area-=c.pop().area,i(c,g,l,!1),g=Math.min(l.dx,l.dy),c.length=c.area=0,d=1/0);c.length&&(i(c,g,l,!0),c.length=c.area=0),o.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var o,a=f(e),u=r.slice(),s=[];for(t(u,a.dx*a.dy/e.value),s.area=0;o=u.pop();)s.push(o),s.area+=o.area,null!=o.z&&(i(s,o.z?a.dx:a.dy,a,!u.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,o=1/0,a=-1,u=t.length;++a<u;)(n=t[a].area)&&(o>n&&(o=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*d/r,r/(e*o*d)):1/0}function i(t,e,n,r){var i,o=-1,a=t.length,u=n.x,l=n.y,c=e?s(t.area/e):0;if(e==n.dx){for((r||c>n.dy)&&(c=n.dy);++o<a;)i=t[o],i.x=u,i.y=l,i.dy=c,u+=i.dx=Math.min(n.x+n.dx-u,c?s(i.area/c):0);i.z=!0,i.dx+=n.x+n.dx-u,n.y+=c,n.dy-=c}else{for((r||c>n.dx)&&(c=n.dx);++o<a;)i=t[o],i.x=u,i.y=l,i.dx=c,l+=i.dy=Math.min(n.y+n.dy-l,c?s(i.area/c):0);i.z=!1,i.dy+=n.y+n.dy-l,n.x+=c,n.dx-=c}}function o(r){var i=a||u(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=l[0],o.dy=l[1]):o.dx=o.dy=0,a&&u.revalue(o),t([o],o.dx*o.dy/o.value),(a?n:e)(o),h&&(a=i),i}var a,u=ca.layout.hierarchy(),s=Math.round,l=[1,1],c=null,f=Wi,h=!1,p="squarify",d=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(l=t,o):l},o.padding=function(t){function e(e){var n=t.call(o,e,e.depth);return null==n?Wi(e):Ui(e,"number"==typeof n?[n,n,n,n]:n)}function n(e){return Ui(e,t)}if(!arguments.length)return c;var r;return f=null==(c=t)?Wi:"function"==(r=typeof t)?e:"number"===r?(t=[t,t,t,t],n):n,o},o.round=function(t){return arguments.length?(s=t?Math.round:Number,o):s!=Number},o.sticky=function(t){return arguments.length?(h=t,a=null,o):h},o.ratio=function(t){return arguments.length?(d=t,o):d},o.mode=function(t){return arguments.length?(p=t+"",o):p},ai(o,u)},ca.random={normal:function(t,e){var n=arguments.length;return 2>n&&(e=1),1>n&&(t=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=ca.random.normal.apply(ca,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=ca.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},ca.scale={};var Cs={floor:x,ceil:x};ca.scale.linear=function(){return Qi([0,1],[0,1],wr,!1)};var Ss={s:1,g:1,p:1,r:1,e:1};ca.scale.log=function(){return oo(ca.scale.linear().domain([0,1]),10,!0,[1,10])};var Ts=ca.format(".0e"),Ns={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};ca.scale.pow=function(){return ao(ca.scale.linear(),1,[0,1])},ca.scale.sqrt=function(){return ca.scale.pow().exponent(.5)},ca.scale.ordinal=function(){return so([],{t:"range",a:[[]]})},ca.scale.category10=function(){return ca.scale.ordinal().range(Os)},ca.scale.category20=function(){return ca.scale.ordinal().range(As)},ca.scale.category20b=function(){return ca.scale.ordinal().range(js)},ca.scale.category20c=function(){return ca.scale.ordinal().range(Ps)};var Os=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(wt),As=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(wt),js=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(wt),Ps=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(wt);ca.scale.quantile=function(){return lo([],[])},ca.scale.quantize=function(){return co(0,1,[0,1])},ca.scale.threshold=function(){return fo([.5],[0,1])},ca.scale.identity=function(){return ho([0,1])},ca.svg={},ca.svg.arc=function(){function t(){var t=Math.max(0,+n.apply(this,arguments)),l=Math.max(0,+r.apply(this,arguments)),c=a.apply(this,arguments)-Ua,f=u.apply(this,arguments)-Ua,h=Math.abs(f-c),p=c>f?0:1;if(t>l&&(d=l,l=t,t=d),h>=Wa)return e(l,p)+(t?e(t,1-p):"")+"Z";var d,g,v,m,y,b,x,w,k,M,_,E,C=0,S=0,T=[];if((m=(+s.apply(this,arguments)||0)/2)&&(v=o===Ls?Math.sqrt(t*t+l*l):+o.apply(this,arguments),p||(S*=-1),l&&(S=rt(v/l*Math.sin(m))),t&&(C=rt(v/t*Math.sin(m)))),l){y=l*Math.cos(c+S),b=l*Math.sin(c+S),x=l*Math.cos(f-S),w=l*Math.sin(f-S);var N=Math.abs(f-c-2*S)<=za?0:1;if(S&&xo(y,b,x,w)===p^N){var O=(c+f)/2;y=l*Math.cos(O),b=l*Math.sin(O),x=w=null}}else y=b=0;if(t){k=t*Math.cos(f-C),M=t*Math.sin(f-C),_=t*Math.cos(c+C),E=t*Math.sin(c+C);var A=Math.abs(c-f+2*C)<=za?0:1;if(C&&xo(k,M,_,E)===1-p^A){var j=(c+f)/2;k=t*Math.cos(j),M=t*Math.sin(j),_=E=null}}else k=M=0;if(h>Fa&&(d=Math.min(Math.abs(l-t)/2,+i.apply(this,arguments)))>.001){g=l>t^p?0:1;var P=d,L=d;if(za>h){var D=null==_?[k,M]:null==x?[y,b]:Rn([y,b],[_,E],[x,w],[k,M]),R=y-D[0],I=b-D[1],q=x-D[0],F=w-D[1],B=1/Math.sin(Math.acos((R*q+I*F)/(Math.sqrt(R*R+I*I)*Math.sqrt(q*q+F*F)))/2),z=Math.sqrt(D[0]*D[0]+D[1]*D[1]);L=Math.min(d,(t-z)/(B-1)),P=Math.min(d,(l-z)/(B+1))}if(null!=x){var H=wo(null==_?[k,M]:[_,E],[y,b],l,P,p),W=wo([x,w],[k,M],l,P,p);d===P?T.push("M",H[0],"A",P,",",P," 0 0,",g," ",H[1],"A",l,",",l," 0 ",1-p^xo(H[1][0],H[1][1],W[1][0],W[1][1]),",",p," ",W[1],"A",P,",",P," 0 0,",g," ",W[0]):T.push("M",H[0],"A",P,",",P," 0 1,",g," ",W[0])}else T.push("M",y,",",b);if(null!=_){var U=wo([y,b],[_,E],t,-L,p),$=wo([k,M],null==x?[y,b]:[x,w],t,-L,p);d===L?T.push("L",$[0],"A",L,",",L," 0 0,",g," ",$[1],"A",t,",",t," 0 ",p^xo($[1][0],$[1][1],U[1][0],U[1][1]),",",1-p," ",U[1],"A",L,",",L," 0 0,",g," ",U[0]):T.push("L",$[0],"A",L,",",L," 0 0,",g," ",U[0])}else T.push("L",k,",",M)}else T.push("M",y,",",b),null!=x&&T.push("A",l,",",l," 0 ",N,",",p," ",x,",",w),T.push("L",k,",",M),null!=_&&T.push("A",t,",",t," 0 ",A,",",1-p," ",_,",",E);return T.push("Z"),T.join("")}function e(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=go,r=vo,i=po,o=Ls,a=mo,u=yo,s=bo;return t.innerRadius=function(e){return arguments.length?(n=Tt(e),t):n},t.outerRadius=function(e){return arguments.length?(r=Tt(e),t):r},t.cornerRadius=function(e){return arguments.length?(i=Tt(e),t):i},t.padRadius=function(e){return arguments.length?(o=e==Ls?Ls:Tt(e),t):o},t.startAngle=function(e){return arguments.length?(a=Tt(e),t):a},t.endAngle=function(e){return arguments.length?(u=Tt(e),t):u},t.padAngle=function(e){return arguments.length?(s=Tt(e),t):s},t.centroid=function(){var t=(+n.apply(this,arguments)+ +r.apply(this,arguments))/2,e=(+a.apply(this,arguments)+ +u.apply(this,arguments))/2-Ua;return[Math.cos(e)*t,Math.sin(e)*t]},t};var Ls="auto";ca.svg.line=function(){return ko(x)};var Ds=ca.map({linear:Mo,"linear-closed":_o,step:Eo,"step-before":Co,"step-after":So,basis:Po,"basis-open":Lo,"basis-closed":Do,bundle:Ro,cardinal:Oo,"cardinal-open":To,"cardinal-closed":No,monotone:Ho});Ds.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Rs=[0,2/3,1/3,0],Is=[0,1/3,2/3,0],qs=[0,1/6,2/3,1/6];ca.svg.line.radial=function(){var t=ko(Wo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},Co.reverse=So,So.reverse=Co,ca.svg.area=function(){return Uo(x)},ca.svg.area.radial=function(){var t=Uo(Wo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},ca.svg.chord=function(){function t(t,u){var s=e(this,o,t,u),l=e(this,a,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,l)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,l.r,l.p0)+r(l.r,l.p1,l.a1-l.a0)+i(l.r,l.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),o=u.call(t,i,r),a=s.call(t,i,r)-Ua,c=l.call(t,i,r)-Ua;return{r:o,a0:a,a1:c,p0:[o*Math.cos(a),o*Math.sin(a)],p1:[o*Math.cos(c),o*Math.sin(c)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>za)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var o=wn,a=kn,u=$o,s=mo,l=yo;return t.radius=function(e){return arguments.length?(u=Tt(e),t):u},t.source=function(e){return arguments.length?(o=Tt(e),t):o},t.target=function(e){return arguments.length?(a=Tt(e),t):a},t.startAngle=function(e){return arguments.length?(s=Tt(e),t):s},t.endAngle=function(e){return arguments.length?(l=Tt(e),t):l},t},ca.svg.diagonal=function(){function t(t,i){var o=e.call(this,t,i),a=n.call(this,t,i),u=(o.y+a.y)/2,s=[o,{x:o.x,y:u},{x:a.x,y:u},a];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=wn,n=kn,r=Vo;return t.source=function(n){return arguments.length?(e=Tt(n),t):e},t.target=function(e){return arguments.length?(n=Tt(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},ca.svg.diagonal.radial=function(){var t=ca.svg.diagonal(),e=Vo,n=t.projection;return t.projection=function(t){return arguments.length?n(Xo(e=t)):e},t},ca.svg.symbol=function(){function t(t,r){return(Fs.get(e.call(this,t,r))||Zo)(n.call(this,t,r))}var e=Go,n=Yo;return t.type=function(n){return arguments.length?(e=Tt(n),t):e},t.size=function(e){return arguments.length?(n=Tt(e),t):n},t};var Fs=ca.map({circle:Zo,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*zs)),n=e*zs;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;
return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Bs),n=e*Bs/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Bs),n=e*Bs/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});ca.svg.symbolTypes=Fs.keys();var Bs=Math.sqrt(3),zs=Math.tan(30*$a);Aa.transition=function(t){for(var e,n,r=Hs||++Vs,i=ea(t),o=[],a=Ws||{time:Date.now(),ease:Tr,delay:0,duration:250},u=-1,s=this.length;++u<s;){o.push(e=[]);for(var l=this[u],c=-1,f=l.length;++c<f;)(n=l[c])&&na(n,c,i,r,a),e.push(n)}return Ko(o,i,r)},Aa.interrupt=function(t){return this.each(null==t?Us:Qo(ea(t)))};var Hs,Ws,Us=Qo(ea()),$s=[],Vs=0;$s.call=Aa.call,$s.empty=Aa.empty,$s.node=Aa.node,$s.size=Aa.size,ca.transition=function(t,e){return t&&t.transition?Hs?t.transition(e):t:ca.selection().transition(t)},ca.transition.prototype=$s,$s.select=function(t){var e,n,r,i=this.id,o=this.namespace,a=[];t=O(t);for(var u=-1,s=this.length;++u<s;){a.push(e=[]);for(var l=this[u],c=-1,f=l.length;++c<f;)(r=l[c])&&(n=t.call(r,r.__data__,c,u))?("__data__"in r&&(n.__data__=r.__data__),na(n,c,o,i,r[o][i]),e.push(n)):e.push(null)}return Ko(a,o,i)},$s.selectAll=function(t){var e,n,r,i,o,a=this.id,u=this.namespace,s=[];t=A(t);for(var l=-1,c=this.length;++l<c;)for(var f=this[l],h=-1,p=f.length;++h<p;)if(r=f[h]){o=r[u][a],n=t.call(r,r.__data__,h,l),s.push(e=[]);for(var d=-1,g=n.length;++d<g;)(i=n[d])&&na(i,d,u,a,o),e.push(i)}return Ko(s,u,a)},$s.filter=function(t){var e,n,r,i=[];"function"!=typeof t&&(t=W(t));for(var o=0,a=this.length;a>o;o++){i.push(e=[]);for(var n=this[o],u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,o)&&e.push(r)}return Ko(i,this.namespace,this.id)},$s.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):$(this,null==e?function(e){e[r][n].tween.remove(t)}:function(i){i[r][n].tween.set(t,e)})},$s.attr=function(t,e){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(u);return n!==t&&(e=a(n,t),function(t){this.setAttribute(u,e(t))})})}function o(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(u.space,u.local);return n!==t&&(e=a(n,t),function(t){this.setAttributeNS(u.space,u.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var a="transform"==t?Gr:wr,u=ca.ns.qualify(t);return Jo(this,"attr."+t,e,u.local?o:i)},$s.attrTween=function(t,e){function n(t,n){var r=e.call(this,t,n,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,n){var r=e.call(this,t,n,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=ca.ns.qualify(t);return this.tween("attr."+t,i.local?r:n)},$s.style=function(t,e,n){function i(){this.style.removeProperty(t)}function o(e){return null==e?i:(e+="",function(){var i,o=r(this).getComputedStyle(this,null).getPropertyValue(t);return o!==e&&(i=wr(o,e),function(e){this.style.setProperty(t,i(e),n)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Jo(this,"style."+t,e,o)},$s.styleTween=function(t,e,n){function i(i,o){var a=e.call(this,i,o,r(this).getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,i)},$s.text=function(t){return Jo(this,"text",t,ta)},$s.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},$s.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:("function"!=typeof t&&(t=ca.ease.apply(ca,arguments)),$(this,function(r){r[n][e].ease=t}))},$s.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:$(this,"function"==typeof t?function(r,i,o){r[n][e].delay=+t.call(r,r.__data__,i,o)}:(t=+t,function(r){r[n][e].delay=t}))},$s.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:$(this,"function"==typeof t?function(r,i,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,i,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},$s.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var i=Ws,o=Hs;try{Hs=n,$(this,function(e,i,o){Ws=e[r][n],t.call(e,e.__data__,i,o)})}finally{Ws=i,Hs=o}}else $(this,function(i){var o=i[r][n];(o.event||(o.event=ca.dispatch("start","end","interrupt"))).on(t,e)});return this},$s.transition=function(){for(var t,e,n,r,i=this.id,o=++Vs,a=this.namespace,u=[],s=0,l=this.length;l>s;s++){u.push(t=[]);for(var e=this[s],c=0,f=e.length;f>c;c++)(n=e[c])&&(r=n[a][i],na(n,c,a,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),t.push(n)}return Ko(u,a,o)},ca.svg.axis=function(){function t(t){t.each(function(){var t,l=ca.select(this),c=this.__chart__||n,f=this.__chart__=n.copy(),h=null==s?f.ticks?f.ticks.apply(f,u):f.domain():s,p=null==e?f.tickFormat?f.tickFormat.apply(f,u):x:e,d=l.selectAll(".tick").data(h,f),g=d.enter().insert("g",".domain").attr("class","tick").style("opacity",Fa),v=ca.transition(d.exit()).style("opacity",Fa).remove(),m=ca.transition(d.order()).style("opacity",1),y=Math.max(i,0)+a,b=Vi(f),w=l.selectAll(".domain").data([0]),k=(w.enter().append("path").attr("class","domain"),ca.transition(w));g.append("line"),g.append("text");var M,_,E,C,S=g.select("line"),T=m.select("line"),N=d.select("text").text(p),O=g.select("text"),A=m.select("text"),j="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=ra,M="x",E="y",_="x2",C="y2",N.attr("dy",0>j?"0em":".71em").style("text-anchor","middle"),k.attr("d","M"+b[0]+","+j*o+"V0H"+b[1]+"V"+j*o)):(t=ia,M="y",E="x",_="y2",C="x2",N.attr("dy",".32em").style("text-anchor",0>j?"end":"start"),k.attr("d","M"+j*o+","+b[0]+"H0V"+b[1]+"H"+j*o)),S.attr(C,j*i),O.attr(E,j*y),T.attr(_,0).attr(C,j*i),A.attr(M,0).attr(E,j*y),f.rangeBand){var P=f,L=P.rangeBand()/2;c=f=function(t){return P(t)+L}}else c.rangeBand?c=f:v.call(t,f,c);g.call(t,c,f),m.call(t,f,f)})}var e,n=ca.scale.linear(),r=Xs,i=6,o=6,a=3,u=[10],s=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in Ys?e+"":Xs,t):r},t.ticks=function(){return arguments.length?(u=ha(arguments),t):u},t.tickValues=function(e){return arguments.length?(s=e,t):s},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,o=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(o=+e,t):o},t.tickPadding=function(e){return arguments.length?(a=+e,t):a},t.tickSubdivide=function(){return arguments.length&&t},t};var Xs="bottom",Ys={top:1,right:1,bottom:1,left:1};ca.svg.brush=function(){function t(r){r.each(function(){var r=ca.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),a=r.selectAll(".background").data([0]);a.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),r.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=r.selectAll(".resize").data(g,x);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Gs[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var s,f=ca.transition(r),h=ca.transition(a);l&&(s=Vi(l),h.attr("x",s[0]).attr("width",s[1]-s[0]),n(f)),c&&(s=Vi(c),h.attr("y",s[0]).attr("height",s[1]-s[0]),i(f)),e(f)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+f[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",f[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function i(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==ca.event.keyCode&&(N||(b=null,A[0]-=f[1],A[1]-=h[1],N=2),C())}function g(){32==ca.event.keyCode&&2==N&&(A[0]+=f[1],A[1]+=h[1],N=0,C())}function v(){var t=ca.mouse(w),r=!1;x&&(t[0]+=x[0],t[1]+=x[1]),N||(ca.event.altKey?(b||(b=[(f[0]+f[1])/2,(h[0]+h[1])/2]),A[0]=f[+(t[0]<b[0])],A[1]=h[+(t[1]<b[1])]):b=null),S&&m(t,l,0)&&(n(_),r=!0),T&&m(t,c,1)&&(i(_),r=!0),r&&(e(_),M({type:"brush",mode:N?"move":"resize"}))}function m(t,e,n){var r,i,o=Vi(e),s=o[0],l=o[1],c=A[n],g=n?h:f,v=g[1]-g[0];return N&&(s-=c,l-=v+c),r=(n?d:p)?Math.max(s,Math.min(l,t[n])):t[n],N?i=(r+=c)+v:(b&&(c=Math.max(s,Math.min(l,2*b[n]-r))),r>c?(i=r,r=c):i=c),g[0]!=r||g[1]!=i?(n?u=null:a=null,g[0]=r,g[1]=i,!0):void 0}function y(){v(),_.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),ca.select("body").style("cursor",null),j.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),O(),M({type:"brushend"})}var b,x,w=this,k=ca.select(ca.event.target),M=s.of(w,arguments),_=ca.select(w),E=k.datum(),S=!/^(n|s)$/.test(E)&&l,T=!/^(e|w)$/.test(E)&&c,N=k.classed("extent"),O=Q(w),A=ca.mouse(w),j=ca.select(r(w)).on("keydown.brush",o).on("keyup.brush",g);if(ca.event.changedTouches?j.on("touchmove.brush",v).on("touchend.brush",y):j.on("mousemove.brush",v).on("mouseup.brush",y),_.interrupt().selectAll("*").interrupt(),N)A[0]=f[0]-A[0],A[1]=h[0]-A[1];else if(E){var P=+/w$/.test(E),L=+/^n/.test(E);x=[f[1-P]-A[0],h[1-L]-A[1]],A[0]=f[P],A[1]=h[L]}else ca.event.altKey&&(b=A.slice());_.style("pointer-events","none").selectAll(".resize").style("display",null),ca.select("body").style("cursor",k.style("cursor")),M({type:"brushstart"}),v()}var a,u,s=T(t,"brushstart","brush","brushend"),l=null,c=null,f=[0,0],h=[0,0],p=!0,d=!0,g=Zs[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),e={x:f,y:h,i:a,j:u},n=this.__chart__||e;this.__chart__=e,Hs?ca.select(this).transition().each("start.brush",function(){a=n.i,u=n.j,f=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=kr(f,e.x),r=kr(h,e.y);return a=u=null,function(i){f=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=e.i,u=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(l=e,g=Zs[!l<<1|!c],t):l},t.y=function(e){return arguments.length?(c=e,g=Zs[!l<<1|!c],t):c},t.clamp=function(e){return arguments.length?(l&&c?(p=!!e[0],d=!!e[1]):l?p=!!e:c&&(d=!!e),t):l&&c?[p,d]:l?p:c?d:null},t.extent=function(e){var n,r,i,o,s;return arguments.length?(l&&(n=e[0],r=e[1],c&&(n=n[0],r=r[0]),a=[n,r],l.invert&&(n=l(n),r=l(r)),n>r&&(s=n,n=r,r=s),n==f[0]&&r==f[1]||(f=[n,r])),c&&(i=e[0],o=e[1],l&&(i=i[1],o=o[1]),u=[i,o],c.invert&&(i=c(i),o=c(o)),i>o&&(s=i,i=o,o=s),i==h[0]&&o==h[1]||(h=[i,o])),t):(l&&(a?(n=a[0],r=a[1]):(n=f[0],r=f[1],l.invert&&(n=l.invert(n),r=l.invert(r)),n>r&&(s=n,n=r,r=s))),c&&(u?(i=u[0],o=u[1]):(i=h[0],o=h[1],c.invert&&(i=c.invert(i),o=c.invert(o)),i>o&&(s=i,i=o,o=s))),l&&c?[[n,i],[r,o]]:l?[n,r]:c&&[i,o])},t.clear=function(){return t.empty()||(f=[0,0],h=[0,0],a=u=null),t},t.empty=function(){return!!l&&f[0]==f[1]||!!c&&h[0]==h[1]},ca.rebind(t,s,"on")};var Gs={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Zs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Qs=vu.format=ku.timeFormat,Ks=Qs.utc,Js=Ks("%Y-%m-%dT%H:%M:%S.%LZ");Qs.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?oa:Js,oa.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},oa.toString=Js.toString,vu.second=Ht(function(t){return new mu(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),vu.seconds=vu.second.range,vu.seconds.utc=vu.second.utc.range,vu.minute=Ht(function(t){return new mu(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),vu.minutes=vu.minute.range,vu.minutes.utc=vu.minute.utc.range,vu.hour=Ht(function(t){var e=t.getTimezoneOffset()/60;return new mu(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),vu.hours=vu.hour.range,vu.hours.utc=vu.hour.utc.range,vu.month=Ht(function(t){return t=vu.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),vu.months=vu.month.range,vu.months.utc=vu.month.utc.range;var tl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],el=[[vu.second,1],[vu.second,5],[vu.second,15],[vu.second,30],[vu.minute,1],[vu.minute,5],[vu.minute,15],[vu.minute,30],[vu.hour,1],[vu.hour,3],[vu.hour,6],[vu.hour,12],[vu.day,1],[vu.day,2],[vu.week,1],[vu.month,1],[vu.month,3],[vu.year,1]],nl=Qs.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Ae]]),rl={range:function(t,e,n){return ca.range(Math.ceil(t/n)*n,+e,n).map(ua)},floor:x,ceil:x};el.year=vu.year,vu.scale=function(){return aa(ca.scale.linear(),el,nl)};var il=el.map(function(t){return[t[0].utc,t[1]]}),ol=Ks.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Ae]]);il.year=vu.year.utc,vu.scale.utc=function(){return aa(ca.scale.linear(),il,ol)},ca.text=Nt(function(t){return t.responseText}),ca.json=function(t,e){return Ot(t,"application/json",sa,e)},ca.html=function(t,e){return Ot(t,"text/html",la,e)},ca.xml=Nt(function(t){return t.responseXML}),"function"==typeof t&&t.amd?(this.d3=ca,t(ca)):"object"==typeof n&&n.exports?n.exports=ca:this.d3=ca}()},{}],9:[function(e,n,r){(function(){"use strict";function e(t,e){var n,r={};for(n in t)r[n]=t[n];for(n in e)r[n]=e[n];return r}function i(t){return t&&"object"==typeof t&&!Array.isArray(t)&&!(t instanceof Function)&&!(t instanceof RegExp)}function o(t,e,n){var r,i,o,a;for(i in t)e.call(n||null,i,t[i]);if(Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(t),o=0,a=r.length;a>o;o++)e.call(n||null,r[o],t[r[o]])}function a(t,e){t=t||[];var n,r,i=[];for(r=0,n=t.length;n>r;r++)t[r].fn!==e&&i.push(t[r]);return i}var u={once:"boolean",scope:"object"},s=0,l=function(){this._enabled=!0,this.unbindAll()};l.prototype.unbindAll=function(){return this._handlers={},this._handlersAll=[],this._handlersComplex=[],this},l.prototype.on=function(t,e,n){var r,a,l,c,f,h,p;if(i(t))return o(t,function(t,n){this.on(t,n,e)},this),this;for("function"==typeof t&&(n=e,e=t,t=null),f=[].concat(t),r=0,a=f.length;a>r;r++){if(c=f[r],p={order:s++,fn:e},"string"==typeof c||"symbol"==typeof c)this._handlers[c]||(this._handlers[c]=[]),h=this._handlers[c],p.type=c;else if(c instanceof RegExp)h=this._handlersComplex,p.pattern=c;else{if(null!==c)throw Error("Emitter.on: invalid event.");h=this._handlersAll}for(l in n||{})u[l]&&(p[l]=n[l]);h.push(p)}return this},l.prototype.once=function(){var t=Array.prototype.slice.call(arguments),n=t.length-1;return i(t[n])&&t.length>1?t[n]=e(t[n],{once:!0}):t.push({once:!0}),this.on.apply(this,t)},l.prototype.off=function(t,e){var n,r,u,s;if(1===arguments.length&&"function"==typeof t){e=arguments[0];for(u in this._handlers)this._handlers[u]=a(this._handlers[u],e),0===this._handlers[u].length&&delete this._handlers[u];this._handlersAll=a(this._handlersAll,e),this._handlersComplex=a(this._handlersComplex,e)}else if(1!==arguments.length||"string"!=typeof t&&"symbol"!=typeof t)if(2===arguments.length){var l=[].concat(t);for(n=0,r=l.length;r>n;n++)s=l[n],this._handlers[s]=a(this._handlers[s],e),0===(this._handlers[s]||[]).length&&delete this._handlers[s]}else i(t)&&o(t,this.off,this);else delete this._handlers[t];return this},l.prototype.listeners=function(t){var e,n,r,i=this._handlersAll||[],o=!1;if(!t)throw Error("Emitter.listeners: no event provided.");for(i=i.concat(this._handlers[t]||[]),n=0,r=this._handlersComplex.length;r>n;n++)e=this._handlersComplex[n],~t.search(e.pattern)&&(o=!0,i.push(e));return this._handlersAll.length||o?i.sort(function(t,e){return t.order-e.order}):i.slice(0)},l.prototype.emit=function(t,e){if(!this._enabled)return this;if(i(t))return o(t,this.emit,this),this;var n,r,a,u,s,l,c,f,h=[].concat(t),p=[];for(s=0,c=h.length;c>s;s++){for(a=this.listeners(h[s]),l=0,f=a.length;f>l;l++)u=a[l],n={type:h[s],target:this},arguments.length>1&&(n.data=e),u.fn.call("scope"in u?u.scope:this,n),u.once&&p.push(u);for(l=p.length-1;l>=0;l--)r=p[l].type?this._handlers[p[l].type]:p[l].pattern?this._handlersComplex:this._handlersAll,r.splice(r.indexOf(p[l]),1)}return this},l.prototype.kill=function(){this.unbindAll(),this._handlers=null,this._handlersAll=null,this._handlersComplex=null,this._enabled=!1,this.unbindAll=this.on=this.once=this.off=this.emit=this.listeners=Function.prototype},l.prototype.disable=function(){return this._enabled=!1,this},l.prototype.enable=function(){return this._enabled=!0,this},l.version="3.1.1","undefined"!=typeof r?("undefined"!=typeof n&&n.exports&&(r=n.exports=l),r.Emitter=l):"function"==typeof t&&t.amd?t("emmett",[],function(){return l}):this.Emitter=l}).call(this)},{}],10:[function(e,n,r){(function(i){!function(e){if("object"==typeof r&&"undefined"!=typeof n)n.exports=e();else if("function"==typeof t&&t.amd)t([],e);else{var o;o="undefined"!=typeof window?window:"undefined"!=typeof i?i:"undefined"!=typeof self?self:this,o.html2canvas=e()}}(function(){var t;return function n(t,r,i){function o(u,s){if(!r[u]){if(!t[u]){var l="function"==typeof e&&e;if(!s&&l)return l(u,!0);if(a)return a(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=r[u]={exports:{}};t[u][0].call(f.exports,function(e){var n=t[u][1][e];return o(n?n:e)},f,f.exports,n,t,r,i)}return r[u].exports}for(var a="function"==typeof e&&e,u=0;u<i.length;u++)o(i[u]);return o}({1:[function(e,n,r){(function(e){!function(i){function o(t){throw new RangeError(L[t])}function a(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function u(t,e){var n=t.split("@"),r="";n.length>1&&(r=n[0]+"@",t=n[1]),t=t.replace(P,".");var i=t.split("."),o=a(i,e).join(".");return r+o}function s(t){for(var e,n,r=[],i=0,o=t.length;o>i;)e=t.charCodeAt(i++),e>=55296&&56319>=e&&o>i?(n=t.charCodeAt(i++),56320==(64512&n)?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--)):r.push(e);return r}function l(t){return a(t,function(t){var e="";return t>65535&&(t-=65536,e+=I(t>>>10&1023|55296),t=56320|1023&t),e+=I(t)}).join("")}function c(t){return 10>t-48?t-22:26>t-65?t-65:26>t-97?t-97:M}function f(t,e){return t+22+75*(26>t)-((0!=e)<<5)}function h(t,e,n){var r=0;for(t=n?R(t/S):t>>1,t+=R(t/e);t>D*E>>1;r+=M)t=R(t/D);return R(r+(D+1)*t/(t+C))}function p(t){var e,n,r,i,a,u,s,f,p,d,g=[],v=t.length,m=0,y=N,b=T;for(n=t.lastIndexOf(O),0>n&&(n=0),r=0;n>r;++r)t.charCodeAt(r)>=128&&o("not-basic"),g.push(t.charCodeAt(r));for(i=n>0?n+1:0;v>i;){for(a=m,u=1,s=M;i>=v&&o("invalid-input"),f=c(t.charCodeAt(i++)),(f>=M||f>R((k-m)/u))&&o("overflow"),m+=f*u,p=b>=s?_:s>=b+E?E:s-b,!(p>f);s+=M)d=M-p,u>R(k/d)&&o("overflow"),u*=d;e=g.length+1,b=h(m-a,e,0==a),R(m/e)>k-y&&o("overflow"),y+=R(m/e),m%=e,g.splice(m++,0,y)}return l(g)}function d(t){var e,n,r,i,a,u,l,c,p,d,g,v,m,y,b,x=[];for(t=s(t),v=t.length,e=N,n=0,a=T,u=0;v>u;++u)g=t[u],128>g&&x.push(I(g));for(r=i=x.length,i&&x.push(O);v>r;){for(l=k,u=0;v>u;++u)g=t[u],g>=e&&l>g&&(l=g);for(m=r+1,l-e>R((k-n)/m)&&o("overflow"),n+=(l-e)*m,e=l,u=0;v>u;++u)if(g=t[u],e>g&&++n>k&&o("overflow"),g==e){for(c=n,p=M;d=a>=p?_:p>=a+E?E:p-a,!(d>c);p+=M)b=c-d,y=M-d,x.push(I(f(d+b%y,0))),c=R(b/y);x.push(I(f(c,0))),a=h(n,m,r==i),n=0,++r}++n,++e}return x.join("")}function g(t){return u(t,function(t){return A.test(t)?p(t.slice(4).toLowerCase()):t})}function v(t){return u(t,function(t){return j.test(t)?"xn--"+d(t):t})}var m="object"==typeof r&&r&&!r.nodeType&&r,y="object"==typeof n&&n&&!n.nodeType&&n,b="object"==typeof e&&e;(b.global===b||b.window===b||b.self===b)&&(i=b);var x,w,k=2147483647,M=36,_=1,E=26,C=38,S=700,T=72,N=128,O="-",A=/^xn--/,j=/[^\x20-\x7E]/,P=/[\x2E\u3002\uFF0E\uFF61]/g,L={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=M-_,R=Math.floor,I=String.fromCharCode;if(x={version:"1.3.2",ucs2:{decode:s,encode:l},decode:p,encode:d,toASCII:v,toUnicode:g},"function"==typeof t&&"object"==typeof t.amd&&t.amd)t("punycode",function(){return x});else if(m&&y)if(n.exports==m)y.exports=x;else for(w in x)x.hasOwnProperty(w)&&(m[w]=x[w]);else i.punycode=x}(this)}).call(this,"undefined"!=typeof i?i:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,n){function r(t,e,n){!t.defaultView||e===t.defaultView.pageXOffset&&n===t.defaultView.pageYOffset||t.defaultView.scrollTo(e,n)}function i(t,e){try{e&&(e.width=t.width,e.height=t.height,e.getContext("2d").putImageData(t.getContext("2d").getImageData(0,0,t.width,t.height),0,0))}catch(n){u("Unable to copy canvas content from",t,n)}}function o(t,e){for(var n=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),r=t.firstChild;r;)(e===!0||1!==r.nodeType||"SCRIPT"!==r.nodeName)&&n.appendChild(o(r,e)),r=r.nextSibling;return 1===t.nodeType&&(n._scrollTop=t.scrollTop,n._scrollLeft=t.scrollLeft,"CANVAS"===t.nodeName?i(t,n):("TEXTAREA"===t.nodeName||"SELECT"===t.nodeName)&&(n.value=t.value)),n}function a(t){if(1===t.nodeType){t.scrollTop=t._scrollTop,t.scrollLeft=t._scrollLeft;for(var e=t.firstChild;e;)a(e),e=e.nextSibling}}var u=t("./log");e.exports=function(t,e,n,i,u,s,l){var c=o(t.documentElement,u.javascriptEnabled),f=e.createElement("iframe");return f.className="html2canvas-container",f.style.visibility="hidden",f.style.position="fixed",f.style.left="-10000px",f.style.top="0px",f.style.border="0",f.width=n,f.height=i,f.scrolling="no",e.body.appendChild(f),new Promise(function(e){var n=f.contentWindow.document;f.contentWindow.onload=f.onload=function(){var t=setInterval(function(){n.body.childNodes.length>0&&(a(n.documentElement),clearInterval(t),"view"===u.type&&(f.contentWindow.scrollTo(s,l),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||f.contentWindow.scrollY===l&&f.contentWindow.scrollX===s||(n.documentElement.style.top=-l+"px",n.documentElement.style.left=-s+"px",n.documentElement.style.position="absolute")),e(f))},50)},n.open(),n.write("<!DOCTYPE html><html></html>"),r(t,s,l),n.replaceChild(n.adoptNode(c),n.documentElement),n.close()})}},{"./log":13}],3:[function(t,e,n){function r(t){this.r=0,this.g=0,this.b=0,this.a=null,this.fromArray(t)||this.namedColor(t)||this.rgb(t)||this.rgba(t)||this.hex6(t)||this.hex3(t)}r.prototype.darken=function(t){var e=1-t;return new r([Math.round(this.r*e),Math.round(this.g*e),Math.round(this.b*e),this.a])},r.prototype.isTransparent=function(){return 0===this.a},r.prototype.isBlack=function(){return 0===this.r&&0===this.g&&0===this.b},r.prototype.fromArray=function(t){return Array.isArray(t)&&(this.r=Math.min(t[0],255),this.g=Math.min(t[1],255),this.b=Math.min(t[2],255),t.length>3&&(this.a=t[3])),Array.isArray(t)};var i=/^#([a-f0-9]{3})$/i;r.prototype.hex3=function(t){var e=null;return null!==(e=t.match(i))&&(this.r=parseInt(e[1][0]+e[1][0],16),this.g=parseInt(e[1][1]+e[1][1],16),this.b=parseInt(e[1][2]+e[1][2],16)),null!==e};var o=/^#([a-f0-9]{6})$/i;r.prototype.hex6=function(t){var e=null;return null!==(e=t.match(o))&&(this.r=parseInt(e[1].substring(0,2),16),this.g=parseInt(e[1].substring(2,4),16),this.b=parseInt(e[1].substring(4,6),16)),null!==e};var a=/^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;r.prototype.rgb=function(t){var e=null;return null!==(e=t.match(a))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3])),null!==e};var u=/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;r.prototype.rgba=function(t){var e=null;return null!==(e=t.match(u))&&(this.r=Number(e[1]),this.g=Number(e[2]),this.b=Number(e[3]),this.a=Number(e[4])),null!==e},r.prototype.toString=function(){return null!==this.a&&1!==this.a?"rgba("+[this.r,this.g,this.b,this.a].join(",")+")":"rgb("+[this.r,this.g,this.b].join(",")+")"},r.prototype.namedColor=function(t){t=t.toLowerCase();var e=s[t];if(e)this.r=e[0],this.g=e[1],this.b=e[2];else if("transparent"===t)return this.r=this.g=this.b=this.a=0,!0;return!!e},r.prototype.isColor=!0;var s={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};e.exports=r},{}],4:[function(e,n,r){function i(t,e){var n=M++;if(e=e||{},e.logging&&(m.options.logging=!0,m.options.start=Date.now()),e.async="undefined"==typeof e.async||e.async,e.allowTaint="undefined"!=typeof e.allowTaint&&e.allowTaint,e.removeContainer="undefined"==typeof e.removeContainer||e.removeContainer,e.javascriptEnabled="undefined"!=typeof e.javascriptEnabled&&e.javascriptEnabled,e.imageTimeout="undefined"==typeof e.imageTimeout?1e4:e.imageTimeout,e.renderer="function"==typeof e.renderer?e.renderer:p,e.strict=!!e.strict,"string"==typeof t){if("string"!=typeof e.proxy)return Promise.reject("Proxy must be used when rendering url");var r=null!=e.width?e.width:window.innerWidth,i=null!=e.height?e.height:window.innerHeight;return x(f(t),e.proxy,document,r,i,e).then(function(t){return a(t.contentWindow.document.documentElement,t,e,r,i)})}var u=(void 0===t?[document.documentElement]:t.length?t:[t])[0];return u.setAttribute(k+n,n),o(u.ownerDocument,e,u.ownerDocument.defaultView.innerWidth,u.ownerDocument.defaultView.innerHeight,n).then(function(t){return"function"==typeof e.onrendered&&(m("options.onrendered is deprecated, html2canvas returns a Promise containing the canvas"),e.onrendered(t)),t})}function o(t,e,n,r,i){return b(t,t,n,r,e,t.defaultView.pageXOffset,t.defaultView.pageYOffset).then(function(o){m("Document cloned");var u=k+i,s="["+u+"='"+i+"']";t.querySelector(s).removeAttribute(u);var l=o.contentWindow,c=l.document.querySelector(s),f="function"==typeof e.onclone?Promise.resolve(e.onclone(l.document)):Promise.resolve(!0);return f.then(function(){return a(c,o,e,n,r)})})}function a(t,e,n,r,i){var o=e.contentWindow,a=new h(o.document),f=new d(n,a),p=w(t),v="view"===n.type?r:l(o.document),y="view"===n.type?i:c(o.document),b=new n.renderer(v,y,f,n,document),x=new g(t,b,a,f,n);return x.ready.then(function(){m("Finished rendering");var r;return r="view"===n.type?s(b.canvas,{width:b.canvas.width,height:b.canvas.height,top:0,left:0,x:0,y:0}):t===o.document.body||t===o.document.documentElement||null!=n.canvas?b.canvas:s(b.canvas,{width:null!=n.width?n.width:p.width,height:null!=n.height?n.height:p.height,top:p.top,left:p.left,x:0,y:0}),u(e,n),r})}function u(t,e){e.removeContainer&&(t.parentNode.removeChild(t),m("Cleaned up container"))}function s(t,e){var n=document.createElement("canvas"),r=Math.min(t.width-1,Math.max(0,e.left)),i=Math.min(t.width,Math.max(1,e.left+e.width)),o=Math.min(t.height-1,Math.max(0,e.top)),a=Math.min(t.height,Math.max(1,e.top+e.height));n.width=e.width,n.height=e.height;var u=i-r,s=a-o;return m("Cropping canvas at:","left:",e.left,"top:",e.top,"width:",u,"height:",s),m("Resulting crop with width",e.width,"and height",e.height,"with x",r,"and y",o),n.getContext("2d").drawImage(t,r,o,u,s,e.x,e.y,u,s),n}function l(t){return Math.max(Math.max(t.body.scrollWidth,t.documentElement.scrollWidth),Math.max(t.body.offsetWidth,t.documentElement.offsetWidth),Math.max(t.body.clientWidth,t.documentElement.clientWidth))}function c(t){return Math.max(Math.max(t.body.scrollHeight,t.documentElement.scrollHeight),Math.max(t.body.offsetHeight,t.documentElement.offsetHeight),Math.max(t.body.clientHeight,t.documentElement.clientHeight))}function f(t){var e=document.createElement("a");
return e.href=t,e.href=e.href,e}var h=e("./support"),p=e("./renderers/canvas"),d=e("./imageloader"),g=e("./nodeparser"),v=e("./nodecontainer"),m=e("./log"),y=e("./utils"),b=e("./clone"),x=e("./proxy").loadUrlDocument,w=y.getBounds,k="data-html2canvas-node",M=0;i.CanvasRenderer=p,i.NodeContainer=v,i.log=m,i.utils=y;var _="undefined"==typeof document||"function"!=typeof Object.create||"function"!=typeof document.createElement("canvas").getContext?function(){return Promise.reject("No canvas support")}:i;n.exports=_,"function"==typeof t&&t.amd&&t("html2canvas",[],function(){return _})},{"./clone":2,"./imageloader":11,"./log":13,"./nodecontainer":14,"./nodeparser":15,"./proxy":16,"./renderers/canvas":20,"./support":22,"./utils":26}],5:[function(t,e,n){function r(t){if(this.src=t,i("DummyImageContainer for",t),!this.promise||!this.image){i("Initiating DummyImageContainer"),r.prototype.image=new Image;var e=this.image;r.prototype.promise=new Promise(function(t,n){e.onload=t,e.onerror=n,e.src=o(),e.complete===!0&&t(e)})}}var i=t("./log"),o=t("./utils").smallImage;e.exports=r},{"./log":13,"./utils":26}],6:[function(t,e,n){function r(t,e){var n,r,o=document.createElement("div"),a=document.createElement("img"),u=document.createElement("span"),s="Hidden Text";o.style.visibility="hidden",o.style.fontFamily=t,o.style.fontSize=e,o.style.margin=0,o.style.padding=0,document.body.appendChild(o),a.src=i(),a.width=1,a.height=1,a.style.margin=0,a.style.padding=0,a.style.verticalAlign="baseline",u.style.fontFamily=t,u.style.fontSize=e,u.style.margin=0,u.style.padding=0,u.appendChild(document.createTextNode(s)),o.appendChild(u),o.appendChild(a),n=a.offsetTop-u.offsetTop+1,o.removeChild(u),o.appendChild(document.createTextNode(s)),o.style.lineHeight="normal",a.style.verticalAlign="super",r=a.offsetTop-o.offsetTop+1,document.body.removeChild(o),this.baseline=n,this.lineWidth=1,this.middle=r}var i=t("./utils").smallImage;e.exports=r},{"./utils":26}],7:[function(t,e,n){function r(){this.data={}}var i=t("./font");r.prototype.getMetrics=function(t,e){return void 0===this.data[t+"-"+e]&&(this.data[t+"-"+e]=new i(t,e)),this.data[t+"-"+e]},e.exports=r},{"./font":6}],8:[function(t,e,n){function r(e,n,r){this.image=null,this.src=e;var i=this,a=o(e);this.promise=(n?new Promise(function(t){"about:blank"===e.contentWindow.document.URL||null==e.contentWindow.document.documentElement?e.contentWindow.onload=e.onload=function(){t(e)}:t(e)}):this.proxyLoad(r.proxy,a,r)).then(function(e){var n=t("./core");return n(e.contentWindow.document.documentElement,{type:"view",width:e.width,height:e.height,proxy:r.proxy,javascriptEnabled:r.javascriptEnabled,removeContainer:r.removeContainer,allowTaint:r.allowTaint,imageTimeout:r.imageTimeout/2})}).then(function(t){return i.image=t})}var i=t("./utils"),o=i.getBounds,a=t("./proxy").loadUrlDocument;r.prototype.proxyLoad=function(t,e,n){var r=this.src;return a(r.src,t,r.ownerDocument,e.width,e.height,n)},e.exports=r},{"./core":4,"./proxy":16,"./utils":26}],9:[function(t,e,n){function r(t){this.src=t.value,this.colorStops=[],this.type=null,this.x0=.5,this.y0=.5,this.x1=.5,this.y1=.5,this.promise=Promise.resolve(!0)}r.TYPES={LINEAR:1,RADIAL:2},r.REGEXP_COLORSTOP=/^\s*(rgba?\(\s*\d{1,3},\s*\d{1,3},\s*\d{1,3}(?:,\s*[0-9\.]+)?\s*\)|[a-z]{3,20}|#[a-f0-9]{3,6})(?:\s+(\d{1,3}(?:\.\d+)?)(%|px)?)?(?:\s|$)/i,e.exports=r},{}],10:[function(t,e,n){function r(t,e){this.src=t,this.image=new Image;var n=this;this.tainted=null,this.promise=new Promise(function(r,i){n.image.onload=r,n.image.onerror=i,e&&(n.image.crossOrigin="anonymous"),n.image.src=t,n.image.complete===!0&&r(n.image)})}e.exports=r},{}],11:[function(t,e,n){function r(t,e){this.link=null,this.options=t,this.support=e,this.origin=this.getOrigin(window.location.href)}var i=t("./log"),o=t("./imagecontainer"),a=t("./dummyimagecontainer"),u=t("./proxyimagecontainer"),s=t("./framecontainer"),l=t("./svgcontainer"),c=t("./svgnodecontainer"),f=t("./lineargradientcontainer"),h=t("./webkitgradientcontainer"),p=t("./utils").bind;r.prototype.findImages=function(t){var e=[];return t.reduce(function(t,e){switch(e.node.nodeName){case"IMG":return t.concat([{args:[e.node.src],method:"url"}]);case"svg":case"IFRAME":return t.concat([{args:[e.node],method:e.node.nodeName}])}return t},[]).forEach(this.addImage(e,this.loadImage),this),e},r.prototype.findBackgroundImage=function(t,e){return e.parseBackgroundImages().filter(this.hasImageBackground).forEach(this.addImage(t,this.loadImage),this),t},r.prototype.addImage=function(t,e){return function(n){n.args.forEach(function(r){this.imageExists(t,r)||(t.splice(0,0,e.call(this,n)),i("Added image #"+t.length,"string"==typeof r?r.substring(0,100):r))},this)}},r.prototype.hasImageBackground=function(t){return"none"!==t.method},r.prototype.loadImage=function(t){if("url"===t.method){var e=t.args[0];return!this.isSVG(e)||this.support.svg||this.options.allowTaint?e.match(/data:image\/.*;base64,/i)?new o(e.replace(/url\(['"]{0,}|['"]{0,}\)$/gi,""),!1):this.isSameOrigin(e)||this.options.allowTaint===!0||this.isSVG(e)?new o(e,!1):this.support.cors&&!this.options.allowTaint&&this.options.useCORS?new o(e,!0):this.options.proxy?new u(e,this.options.proxy):new a(e):new l(e)}return"linear-gradient"===t.method?new f(t):"gradient"===t.method?new h(t):"svg"===t.method?new c(t.args[0],this.support.svg):"IFRAME"===t.method?new s(t.args[0],this.isSameOrigin(t.args[0].src),this.options):new a(t)},r.prototype.isSVG=function(t){return"svg"===t.substring(t.length-3).toLowerCase()||l.prototype.isInline(t)},r.prototype.imageExists=function(t,e){return t.some(function(t){return t.src===e})},r.prototype.isSameOrigin=function(t){return this.getOrigin(t)===this.origin},r.prototype.getOrigin=function(t){var e=this.link||(this.link=document.createElement("a"));return e.href=t,e.href=e.href,e.protocol+e.hostname+e.port},r.prototype.getPromise=function(t){return this.timeout(t,this.options.imageTimeout)["catch"](function(){var e=new a(t.src);return e.promise.then(function(e){t.image=e})})},r.prototype.get=function(t){var e=null;return this.images.some(function(n){return(e=n).src===t})?e:null},r.prototype.fetch=function(t){return this.images=t.reduce(p(this.findBackgroundImage,this),this.findImages(t)),this.images.forEach(function(t,e){t.promise.then(function(){i("Succesfully loaded image #"+(e+1),t)},function(n){i("Failed loading image #"+(e+1),t,n)})}),this.ready=Promise.all(this.images.map(this.getPromise,this)),i("Finished searching images"),this},r.prototype.timeout=function(t,e){var n,r=Promise.race([t.promise,new Promise(function(r,o){n=setTimeout(function(){i("Timed out loading image",t),o(t)},e)})]).then(function(t){return clearTimeout(n),t});return r["catch"](function(){clearTimeout(n)}),r},e.exports=r},{"./dummyimagecontainer":5,"./framecontainer":8,"./imagecontainer":10,"./lineargradientcontainer":12,"./log":13,"./proxyimagecontainer":17,"./svgcontainer":23,"./svgnodecontainer":24,"./utils":26,"./webkitgradientcontainer":27}],12:[function(t,e,n){function r(t){i.apply(this,arguments),this.type=i.TYPES.LINEAR;var e=r.REGEXP_DIRECTION.test(t.args[0])||!i.REGEXP_COLORSTOP.test(t.args[0]);e?t.args[0].split(/\s+/).reverse().forEach(function(t,e){switch(t){case"left":this.x0=0,this.x1=1;break;case"top":this.y0=0,this.y1=1;break;case"right":this.x0=1,this.x1=0;break;case"bottom":this.y0=1,this.y1=0;break;case"to":var n=this.y0,r=this.x0;this.y0=this.y1,this.x0=this.x1,this.x1=r,this.y1=n;break;case"center":break;default:var i=.01*parseFloat(t,10);if(isNaN(i))break;0===e?(this.y0=i,this.y1=1-this.y0):(this.x0=i,this.x1=1-this.x0)}},this):(this.y0=0,this.y1=1),this.colorStops=t.args.slice(e?1:0).map(function(t){var e=t.match(i.REGEXP_COLORSTOP),n=+e[2],r=0===n?"%":e[3];return{color:new o(e[1]),stop:"%"===r?n/100:null}}),null===this.colorStops[0].stop&&(this.colorStops[0].stop=0),null===this.colorStops[this.colorStops.length-1].stop&&(this.colorStops[this.colorStops.length-1].stop=1),this.colorStops.forEach(function(t,e){null===t.stop&&this.colorStops.slice(e).some(function(n,r){return null!==n.stop&&(t.stop=(n.stop-this.colorStops[e-1].stop)/(r+1)+this.colorStops[e-1].stop,!0)},this)},this)}var i=t("./gradientcontainer"),o=t("./color");r.prototype=Object.create(i.prototype),r.REGEXP_DIRECTION=/^\s*(?:to|left|right|top|bottom|center|\d{1,3}(?:\.\d+)?%?)(?:\s|$)/i,e.exports=r},{"./color":3,"./gradientcontainer":9}],13:[function(t,e,n){var r=function(){r.options.logging&&window.console&&window.console.log&&Function.prototype.bind.call(window.console.log,window.console).apply(window.console,[Date.now()-r.options.start+"ms","html2canvas:"].concat([].slice.call(arguments,0)))};r.options={logging:!1},e.exports=r},{}],14:[function(t,e,n){function r(t,e){this.node=t,this.parent=e,this.stack=null,this.bounds=null,this.borders=null,this.clip=[],this.backgroundClip=[],this.offsetBounds=null,this.visible=null,this.computedStyles=null,this.colors={},this.styles={},this.backgroundImages=null,this.transformData=null,this.transformMatrix=null,this.isPseudoElement=!1,this.opacity=null}function i(t){var e=t.options[t.selectedIndex||0];return e?e.text||"":""}function o(t){if(t&&"matrix"===t[1])return t[2].split(",").map(function(t){return parseFloat(t.trim())});if(t&&"matrix3d"===t[1]){var e=t[2].split(",").map(function(t){return parseFloat(t.trim())});return[e[0],e[1],e[4],e[5],e[12],e[13]]}}function a(t){return-1!==t.toString().indexOf("%")}function u(t){return t.replace("px","")}function s(t){return parseFloat(t)}var l=t("./color"),c=t("./utils"),f=c.getBounds,h=c.parseBackgrounds,p=c.offsetBounds;r.prototype.cloneTo=function(t){t.visible=this.visible,t.borders=this.borders,t.bounds=this.bounds,t.clip=this.clip,t.backgroundClip=this.backgroundClip,t.computedStyles=this.computedStyles,t.styles=this.styles,t.backgroundImages=this.backgroundImages,t.opacity=this.opacity},r.prototype.getOpacity=function(){return null===this.opacity?this.opacity=this.cssFloat("opacity"):this.opacity},r.prototype.assignStack=function(t){this.stack=t,t.children.push(this)},r.prototype.isElementVisible=function(){return this.node.nodeType===Node.TEXT_NODE?this.parent.visible:"none"!==this.css("display")&&"hidden"!==this.css("visibility")&&!this.node.hasAttribute("data-html2canvas-ignore")&&("INPUT"!==this.node.nodeName||"hidden"!==this.node.getAttribute("type"))},r.prototype.css=function(t){return this.computedStyles||(this.computedStyles=this.isPseudoElement?this.parent.computedStyle(this.before?":before":":after"):this.computedStyle(null)),this.styles[t]||(this.styles[t]=this.computedStyles[t])},r.prototype.prefixedCss=function(t){var e=["webkit","moz","ms","o"],n=this.css(t);return void 0===n&&e.some(function(e){return n=this.css(e+t.substr(0,1).toUpperCase()+t.substr(1)),void 0!==n},this),void 0===n?null:n},r.prototype.computedStyle=function(t){return this.node.ownerDocument.defaultView.getComputedStyle(this.node,t)},r.prototype.cssInt=function(t){var e=parseInt(this.css(t),10);return isNaN(e)?0:e},r.prototype.color=function(t){return this.colors[t]||(this.colors[t]=new l(this.css(t)))},r.prototype.cssFloat=function(t){var e=parseFloat(this.css(t));return isNaN(e)?0:e},r.prototype.fontWeight=function(){var t=this.css("fontWeight");switch(parseInt(t,10)){case 401:t="bold";break;case 400:t="normal"}return t},r.prototype.parseClip=function(){var t=this.css("clip").match(this.CLIP);return t?{top:parseInt(t[1],10),right:parseInt(t[2],10),bottom:parseInt(t[3],10),left:parseInt(t[4],10)}:null},r.prototype.parseBackgroundImages=function(){return this.backgroundImages||(this.backgroundImages=h(this.css("backgroundImage")))},r.prototype.cssList=function(t,e){var n=(this.css(t)||"").split(",");return n=n[e||0]||n[0]||"auto",n=n.trim().split(" "),1===n.length&&(n=[n[0],a(n[0])?"auto":n[0]]),n},r.prototype.parseBackgroundSize=function(t,e,n){var r,i,o=this.cssList("backgroundSize",n);if(a(o[0]))r=t.width*parseFloat(o[0])/100;else{if(/contain|cover/.test(o[0])){var u=t.width/t.height,s=e.width/e.height;return s>u^"contain"===o[0]?{width:t.height*s,height:t.height}:{width:t.width,height:t.width/s}}r=parseInt(o[0],10)}return i="auto"===o[0]&&"auto"===o[1]?e.height:"auto"===o[1]?r/e.width*e.height:a(o[1])?t.height*parseFloat(o[1])/100:parseInt(o[1],10),"auto"===o[0]&&(r=i/e.height*e.width),{width:r,height:i}},r.prototype.parseBackgroundPosition=function(t,e,n,r){var i,o,u=this.cssList("backgroundPosition",n);return i=a(u[0])?(t.width-(r||e).width)*(parseFloat(u[0])/100):parseInt(u[0],10),o="auto"===u[1]?i/e.width*e.height:a(u[1])?(t.height-(r||e).height)*parseFloat(u[1])/100:parseInt(u[1],10),"auto"===u[0]&&(i=o/e.height*e.width),{left:i,top:o}},r.prototype.parseBackgroundRepeat=function(t){return this.cssList("backgroundRepeat",t)[0]},r.prototype.parseTextShadows=function(){var t=this.css("textShadow"),e=[];if(t&&"none"!==t)for(var n=t.match(this.TEXT_SHADOW_PROPERTY),r=0;n&&r<n.length;r++){var i=n[r].match(this.TEXT_SHADOW_VALUES);e.push({color:new l(i[0]),offsetX:i[1]?parseFloat(i[1].replace("px","")):0,offsetY:i[2]?parseFloat(i[2].replace("px","")):0,blur:i[3]?i[3].replace("px",""):0})}return e},r.prototype.parseTransform=function(){if(!this.transformData)if(this.hasTransform()){var t=this.parseBounds(),e=this.prefixedCss("transformOrigin").split(" ").map(u).map(s);e[0]+=t.left,e[1]+=t.top,this.transformData={origin:e,matrix:this.parseTransformMatrix()}}else this.transformData={origin:[0,0],matrix:[1,0,0,1,0,0]};return this.transformData},r.prototype.parseTransformMatrix=function(){if(!this.transformMatrix){var t=this.prefixedCss("transform"),e=t?o(t.match(this.MATRIX_PROPERTY)):null;this.transformMatrix=e?e:[1,0,0,1,0,0]}return this.transformMatrix},r.prototype.parseBounds=function(){return this.bounds||(this.bounds=this.hasTransform()?p(this.node):f(this.node))},r.prototype.hasTransform=function(){return"1,0,0,1,0,0"!==this.parseTransformMatrix().join(",")||this.parent&&this.parent.hasTransform()},r.prototype.getValue=function(){var t=this.node.value||"";return"SELECT"===this.node.tagName?t=i(this.node):"password"===this.node.type&&(t=Array(t.length+1).join("•")),0===t.length?this.node.placeholder||"":t},r.prototype.MATRIX_PROPERTY=/(matrix|matrix3d)\((.+)\)/,r.prototype.TEXT_SHADOW_PROPERTY=/((rgba|rgb)\([^\)]+\)(\s-?\d+px){0,})/g,r.prototype.TEXT_SHADOW_VALUES=/(-?\d+px)|(#.+)|(rgb\(.+\))|(rgba\(.+\))/g,r.prototype.CLIP=/^rect\((\d+)px,? (\d+)px,? (\d+)px,? (\d+)px\)$/,e.exports=r},{"./color":3,"./utils":26}],15:[function(t,e,n){function r(t,e,n,r,i){B("Starting NodeParser"),this.renderer=e,this.options=i,this.range=null,this.support=n,this.renderQueue=[],this.stack=new X(!0,1,t.ownerDocument,null);var o=new H(t,null);if(i.background&&e.rectangle(0,0,e.width,e.height,new V(i.background)),t===t.ownerDocument.documentElement){var a=new H(o.color("backgroundColor").isTransparent()?t.ownerDocument.body:t.ownerDocument.documentElement,null);e.rectangle(0,0,e.width,e.height,a.color("backgroundColor"))}o.visibile=o.isElementVisible(),this.createPseudoHideStyles(t.ownerDocument),this.disableAnimations(t.ownerDocument),this.nodes=D([o].concat(this.getChildren(o)).filter(function(t){return t.visible=t.isElementVisible()}).map(this.getPseudoElements,this)),this.fontMetrics=new $,B("Fetched nodes, total:",this.nodes.length),B("Calculate overflow clips"),this.calculateOverflowClips(),B("Start fetching images"),this.images=r.fetch(this.nodes.filter(S)),this.ready=this.images.ready.then(G(function(){return B("Images loaded, starting parsing"),B("Creating stacking contexts"),this.createStackingContexts(),B("Sorting stacking contexts"),this.sortStackingContexts(this.stack),this.parse(this.stack),B("Render queue created with "+this.renderQueue.length+" items"),new Promise(G(function(t){i.async?"function"==typeof i.async?i.async.call(this,this.renderQueue,t):this.renderQueue.length>0?(this.renderIndex=0,this.asyncRenderer(this.renderQueue,t)):t():(this.renderQueue.forEach(this.paint,this),t())},this))},this))}function i(t){return t.parent&&t.parent.clip.length}function o(t){return t.replace(/(\-[a-z])/g,function(t){return t.toUpperCase().replace("-","")})}function a(){}function u(t,e,n,r){return t.map(function(i,o){if(i.width>0){var a=e.left,u=e.top,s=e.width,l=e.height-t[2].width;switch(o){case 0:l=t[0].width,i.args=f({c1:[a,u],c2:[a+s,u],c3:[a+s-t[1].width,u+l],c4:[a+t[3].width,u+l]},r[0],r[1],n.topLeftOuter,n.topLeftInner,n.topRightOuter,n.topRightInner);break;case 1:a=e.left+e.width-t[1].width,s=t[1].width,i.args=f({c1:[a+s,u],c2:[a+s,u+l+t[2].width],c3:[a,u+l],c4:[a,u+t[0].width]},r[1],r[2],n.topRightOuter,n.topRightInner,n.bottomRightOuter,n.bottomRightInner);break;case 2:u=u+e.height-t[2].width,l=t[2].width,i.args=f({c1:[a+s,u+l],c2:[a,u+l],c3:[a+t[3].width,u],c4:[a+s-t[3].width,u]},r[2],r[3],n.bottomRightOuter,n.bottomRightInner,n.bottomLeftOuter,n.bottomLeftInner);break;case 3:s=t[3].width,i.args=f({c1:[a,u+l+t[2].width],c2:[a,u],c3:[a+s,u+t[0].width],c4:[a+s,u+l]},r[3],r[0],n.bottomLeftOuter,n.bottomLeftInner,n.topLeftOuter,n.topLeftInner)}}return i})}function s(t,e,n,r){var i=4*((Math.sqrt(2)-1)/3),o=n*i,a=r*i,u=t+n,s=e+r;return{topLeft:c({x:t,y:s},{x:t,y:s-a},{x:u-o,y:e},{x:u,y:e}),topRight:c({x:t,y:e},{x:t+o,y:e},{x:u,y:s-a},{x:u,y:s}),bottomRight:c({x:u,y:e},{x:u,y:e+a},{x:t+o,y:s},{x:t,y:s}),bottomLeft:c({x:u,y:s},{x:u-o,y:s},{x:t,y:e+a},{x:t,y:e})}}function l(t,e,n){var r=t.left,i=t.top,o=t.width,a=t.height,u=e[0][0]<o/2?e[0][0]:o/2,l=e[0][1]<a/2?e[0][1]:a/2,c=e[1][0]<o/2?e[1][0]:o/2,f=e[1][1]<a/2?e[1][1]:a/2,h=e[2][0]<o/2?e[2][0]:o/2,p=e[2][1]<a/2?e[2][1]:a/2,d=e[3][0]<o/2?e[3][0]:o/2,g=e[3][1]<a/2?e[3][1]:a/2,v=o-c,m=a-p,y=o-h,b=a-g;return{topLeftOuter:s(r,i,u,l).topLeft.subdivide(.5),topLeftInner:s(r+n[3].width,i+n[0].width,Math.max(0,u-n[3].width),Math.max(0,l-n[0].width)).topLeft.subdivide(.5),topRightOuter:s(r+v,i,c,f).topRight.subdivide(.5),topRightInner:s(r+Math.min(v,o+n[3].width),i+n[0].width,v>o+n[3].width?0:c-n[3].width,f-n[0].width).topRight.subdivide(.5),bottomRightOuter:s(r+y,i+m,h,p).bottomRight.subdivide(.5),bottomRightInner:s(r+Math.min(y,o-n[3].width),i+Math.min(m,a+n[0].width),Math.max(0,h-n[1].width),p-n[2].width).bottomRight.subdivide(.5),bottomLeftOuter:s(r,i+b,d,g).bottomLeft.subdivide(.5),bottomLeftInner:s(r+n[3].width,i+b,Math.max(0,d-n[3].width),g-n[2].width).bottomLeft.subdivide(.5)}}function c(t,e,n,r){var i=function(t,e,n){return{x:t.x+(e.x-t.x)*n,y:t.y+(e.y-t.y)*n}};return{start:t,startControl:e,endControl:n,end:r,subdivide:function(o){var a=i(t,e,o),u=i(e,n,o),s=i(n,r,o),l=i(a,u,o),f=i(u,s,o),h=i(l,f,o);return[c(t,a,l,h),c(h,f,s,r)]},curveTo:function(t){t.push(["bezierCurve",e.x,e.y,n.x,n.y,r.x,r.y])},curveToReversed:function(r){r.push(["bezierCurve",n.x,n.y,e.x,e.y,t.x,t.y])}}}function f(t,e,n,r,i,o,a){var u=[];return e[0]>0||e[1]>0?(u.push(["line",r[1].start.x,r[1].start.y]),r[1].curveTo(u)):u.push(["line",t.c1[0],t.c1[1]]),n[0]>0||n[1]>0?(u.push(["line",o[0].start.x,o[0].start.y]),o[0].curveTo(u),u.push(["line",a[0].end.x,a[0].end.y]),a[0].curveToReversed(u)):(u.push(["line",t.c2[0],t.c2[1]]),u.push(["line",t.c3[0],t.c3[1]])),e[0]>0||e[1]>0?(u.push(["line",i[1].end.x,i[1].end.y]),i[1].curveToReversed(u)):u.push(["line",t.c4[0],t.c4[1]]),u}function h(t,e,n,r,i,o,a){e[0]>0||e[1]>0?(t.push(["line",r[0].start.x,r[0].start.y]),r[0].curveTo(t),r[1].curveTo(t)):t.push(["line",o,a]),(n[0]>0||n[1]>0)&&t.push(["line",i[0].start.x,i[0].start.y])}function p(t){return t.cssInt("zIndex")<0}function d(t){return t.cssInt("zIndex")>0}function g(t){return 0===t.cssInt("zIndex")}function v(t){return-1!==["inline","inline-block","inline-table"].indexOf(t.css("display"))}function m(t){return t instanceof X}function y(t){return t.node.data.trim().length>0}function b(t){return/^(normal|none|0px)$/.test(t.parent.css("letterSpacing"))}function x(t){return["TopLeft","TopRight","BottomRight","BottomLeft"].map(function(e){var n=t.css("border"+e+"Radius"),r=n.split(" ");return r.length<=1&&(r[1]=r[0]),r.map(j)})}function w(t){return t.nodeType===Node.TEXT_NODE||t.nodeType===Node.ELEMENT_NODE}function k(t){var e=t.css("position"),n=-1!==["absolute","relative","fixed"].indexOf(e)?t.css("zIndex"):"auto";return"auto"!==n}function M(t){return"static"!==t.css("position")}function _(t){return"none"!==t.css("float")}function E(t){return-1!==["inline-block","inline-table"].indexOf(t.css("display"))}function C(t){var e=this;return function(){return!t.apply(e,arguments)}}function S(t){return t.node.nodeType===Node.ELEMENT_NODE}function T(t){return t.isPseudoElement===!0}function N(t){return t.node.nodeType===Node.TEXT_NODE}function O(t){return function(e,n){return e.cssInt("zIndex")+t.indexOf(e)/t.length-(n.cssInt("zIndex")+t.indexOf(n)/t.length)}}function A(t){return t.getOpacity()<1}function j(t){return parseInt(t,10)}function P(t){return t.width}function L(t){return t.node.nodeType!==Node.ELEMENT_NODE||-1===["SCRIPT","HEAD","TITLE","OBJECT","BR","OPTION"].indexOf(t.node.nodeName)}function D(t){return[].concat.apply([],t)}function R(t){var e=t.substr(0,1);return e===t.substr(t.length-1)&&e.match(/'|"/)?t.substr(1,t.length-2):t}function I(t){for(var e,n=[],r=0,i=!1;t.length;)q(t[r])===i?(e=t.splice(0,r),e.length&&n.push(z.ucs2.encode(e)),i=!i,r=0):r++,r>=t.length&&(e=t.splice(0,r),e.length&&n.push(z.ucs2.encode(e)));return n}function q(t){return-1!==[32,13,10,9,45].indexOf(t)}function F(t){return/[^\u0000-\u00ff]/.test(t)}var B=t("./log"),z=t("punycode"),H=t("./nodecontainer"),W=t("./textcontainer"),U=t("./pseudoelementcontainer"),$=t("./fontmetrics"),V=t("./color"),X=t("./stackingcontext"),Y=t("./utils"),G=Y.bind,Z=Y.getBounds,Q=Y.parseBackgrounds,K=Y.offsetBounds;r.prototype.calculateOverflowClips=function(){this.nodes.forEach(function(t){if(S(t)){T(t)&&t.appendToDOM(),t.borders=this.parseBorders(t);var e="hidden"===t.css("overflow")?[t.borders.clip]:[],n=t.parseClip();n&&-1!==["absolute","fixed"].indexOf(t.css("position"))&&e.push([["rect",t.bounds.left+n.left,t.bounds.top+n.top,n.right-n.left,n.bottom-n.top]]),t.clip=i(t)?t.parent.clip.concat(e):e,t.backgroundClip="hidden"!==t.css("overflow")?t.clip.concat([t.borders.clip]):t.clip,T(t)&&t.cleanDOM()}else N(t)&&(t.clip=i(t)?t.parent.clip:[]);T(t)||(t.bounds=null)},this)},r.prototype.asyncRenderer=function(t,e,n){n=n||Date.now(),this.paint(t[this.renderIndex++]),t.length===this.renderIndex?e():n+20>Date.now()?this.asyncRenderer(t,e,n):setTimeout(G(function(){this.asyncRenderer(t,e)},this),0)},r.prototype.createPseudoHideStyles=function(t){this.createStyles(t,"."+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+':before { content: "" !important; display: none !important; }.'+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER+':after { content: "" !important; display: none !important; }')},r.prototype.disableAnimations=function(t){this.createStyles(t,"* { -webkit-animation: none !important; -moz-animation: none !important; -o-animation: none !important; animation: none !important; -webkit-transition: none !important; -moz-transition: none !important; -o-transition: none !important; transition: none !important;}")},r.prototype.createStyles=function(t,e){var n=t.createElement("style");n.innerHTML=e,t.body.appendChild(n)},r.prototype.getPseudoElements=function(t){var e=[[t]];if(t.node.nodeType===Node.ELEMENT_NODE){var n=this.getPseudoElement(t,":before"),r=this.getPseudoElement(t,":after");n&&e.push(n),r&&e.push(r)}return D(e)},r.prototype.getPseudoElement=function(t,e){var n=t.computedStyle(e);if(!n||!n.content||"none"===n.content||"-moz-alt-content"===n.content||"none"===n.display)return null;for(var r=R(n.content),i="url"===r.substr(0,3),a=document.createElement(i?"img":"html2canvaspseudoelement"),u=new U(a,t,e),s=n.length-1;s>=0;s--){var l=o(n.item(s));a.style[l]=n[l]}if(a.className=U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE+" "+U.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER,i)return a.src=Q(r)[0].args[0],[u];var c=document.createTextNode(r);return a.appendChild(c),[u,new W(c,u)]},r.prototype.getChildren=function(t){return D([].filter.call(t.node.childNodes,w).map(function(e){var n=[e.nodeType===Node.TEXT_NODE?new W(e,t):new H(e,t)].filter(L);return e.nodeType===Node.ELEMENT_NODE&&n.length&&"TEXTAREA"!==e.tagName?n[0].isElementVisible()?n.concat(this.getChildren(n[0])):[]:n},this))},r.prototype.newStackingContext=function(t,e){var n=new X(e,t.getOpacity(),t.node,t.parent);t.cloneTo(n);var r=e?n.getParentStack(this):n.parent.stack;r.contexts.push(n),t.stack=n},r.prototype.createStackingContexts=function(){this.nodes.forEach(function(t){S(t)&&(this.isRootElement(t)||A(t)||k(t)||this.isBodyWithTransparentRoot(t)||t.hasTransform())?this.newStackingContext(t,!0):S(t)&&(M(t)&&g(t)||E(t)||_(t))?this.newStackingContext(t,!1):t.assignStack(t.parent.stack)},this)},r.prototype.isBodyWithTransparentRoot=function(t){return"BODY"===t.node.nodeName&&t.parent.color("backgroundColor").isTransparent()},r.prototype.isRootElement=function(t){return null===t.parent},r.prototype.sortStackingContexts=function(t){t.contexts.sort(O(t.contexts.slice(0))),t.contexts.forEach(this.sortStackingContexts,this)},r.prototype.parseTextBounds=function(t){return function(e,n,r){if("none"!==t.parent.css("textDecoration").substr(0,4)||0!==e.trim().length){if(this.support.rangeBounds&&!t.parent.hasTransform()){var i=r.slice(0,n).join("").length;return this.getRangeBounds(t.node,i,e.length)}if(t.node&&"string"==typeof t.node.data){var o=t.node.splitText(e.length),a=this.getWrapperBounds(t.node,t.parent.hasTransform());return t.node=o,a}}else(!this.support.rangeBounds||t.parent.hasTransform())&&(t.node=t.node.splitText(e.length));return{}}},r.prototype.getWrapperBounds=function(t,e){var n=t.ownerDocument.createElement("html2canvaswrapper"),r=t.parentNode,i=t.cloneNode(!0);n.appendChild(t.cloneNode(!0)),r.replaceChild(n,t);var o=e?K(n):Z(n);return r.replaceChild(i,n),o},r.prototype.getRangeBounds=function(t,e,n){var r=this.range||(this.range=t.ownerDocument.createRange());return r.setStart(t,e),r.setEnd(t,e+n),r.getBoundingClientRect()},r.prototype.parse=function(t){var e=t.contexts.filter(p),n=t.children.filter(S),r=n.filter(C(_)),i=r.filter(C(M)).filter(C(v)),o=n.filter(C(M)).filter(_),u=r.filter(C(M)).filter(v),s=t.contexts.concat(r.filter(M)).filter(g),l=t.children.filter(N).filter(y),c=t.contexts.filter(d);e.concat(i).concat(o).concat(u).concat(s).concat(l).concat(c).forEach(function(t){this.renderQueue.push(t),m(t)&&(this.parse(t),this.renderQueue.push(new a))},this)},r.prototype.paint=function(t){try{t instanceof a?this.renderer.ctx.restore():N(t)?(T(t.parent)&&t.parent.appendToDOM(),this.paintText(t),T(t.parent)&&t.parent.cleanDOM()):this.paintNode(t)}catch(e){if(B(e),this.options.strict)throw e}},r.prototype.paintNode=function(t){m(t)&&(this.renderer.setOpacity(t.opacity),this.renderer.ctx.save(),t.hasTransform()&&this.renderer.setTransform(t.parseTransform())),"INPUT"===t.node.nodeName&&"checkbox"===t.node.type?this.paintCheckbox(t):"INPUT"===t.node.nodeName&&"radio"===t.node.type?this.paintRadio(t):this.paintElement(t)},r.prototype.paintElement=function(t){var e=t.parseBounds();this.renderer.clip(t.backgroundClip,function(){this.renderer.renderBackground(t,e,t.borders.borders.map(P))},this),this.renderer.clip(t.clip,function(){this.renderer.renderBorders(t.borders.borders)},this),this.renderer.clip(t.backgroundClip,function(){switch(t.node.nodeName){case"svg":case"IFRAME":var n=this.images.get(t.node);n?this.renderer.renderImage(t,e,t.borders,n):B("Error loading <"+t.node.nodeName+">",t.node);break;case"IMG":var r=this.images.get(t.node.src);r?this.renderer.renderImage(t,e,t.borders,r):B("Error loading <img>",t.node.src);break;case"CANVAS":this.renderer.renderImage(t,e,t.borders,{image:t.node});break;case"SELECT":case"INPUT":case"TEXTAREA":this.paintFormValue(t)}},this)},r.prototype.paintCheckbox=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height),r={width:n-1,height:n-1,top:e.top,left:e.left},i=[3,3],o=[i,i,i,i],a=[1,1,1,1].map(function(t){return{color:new V("#A5A5A5"),width:t}}),s=l(r,o,a);this.renderer.clip(t.backgroundClip,function(){this.renderer.rectangle(r.left+1,r.top+1,r.width-2,r.height-2,new V("#DEDEDE")),this.renderer.renderBorders(u(a,r,s,o)),t.node.checked&&(this.renderer.font(new V("#424242"),"normal","normal","bold",n-3+"px","arial"),this.renderer.text("✔",r.left+n/6,r.top+n-1))},this)},r.prototype.paintRadio=function(t){var e=t.parseBounds(),n=Math.min(e.width,e.height)-2;this.renderer.clip(t.backgroundClip,function(){this.renderer.circleStroke(e.left+1,e.top+1,n,new V("#DEDEDE"),1,new V("#A5A5A5")),t.node.checked&&this.renderer.circle(Math.ceil(e.left+n/4)+1,Math.ceil(e.top+n/4)+1,Math.floor(n/2),new V("#424242"))},this)},r.prototype.paintFormValue=function(t){var e=t.getValue();if(e.length>0){var n=t.node.ownerDocument,r=n.createElement("html2canvaswrapper"),i=["lineHeight","textAlign","fontFamily","fontWeight","fontSize","color","paddingLeft","paddingTop","paddingRight","paddingBottom","width","height","borderLeftStyle","borderTopStyle","borderLeftWidth","borderTopWidth","boxSizing","whiteSpace","wordWrap"];i.forEach(function(e){try{r.style[e]=t.css(e)}catch(n){B("html2canvas: Parse: Exception caught in renderFormValue: "+n.message)}});var o=t.parseBounds();r.style.position="fixed",r.style.left=o.left+"px",r.style.top=o.top+"px",r.textContent=e,n.body.appendChild(r),this.paintText(new W(r.firstChild,t)),n.body.removeChild(r)}},r.prototype.paintText=function(t){t.applyTextTransform();var e=z.ucs2.decode(t.node.data),n=this.options.letterRendering&&!b(t)||F(t.node.data)?e.map(function(t){return z.ucs2.encode([t])}):I(e),r=t.parent.fontWeight(),i=t.parent.css("fontSize"),o=t.parent.css("fontFamily"),a=t.parent.parseTextShadows();this.renderer.font(t.parent.color("color"),t.parent.css("fontStyle"),t.parent.css("fontVariant"),r,i,o),a.length?this.renderer.fontShadow(a[0].color,a[0].offsetX,a[0].offsetY,a[0].blur):this.renderer.clearShadow(),this.renderer.clip(t.parent.clip,function(){n.map(this.parseTextBounds(t),this).forEach(function(e,r){e&&(this.renderer.text(n[r],e.left,e.bottom),this.renderTextDecoration(t.parent,e,this.fontMetrics.getMetrics(o,i)))},this)},this)},r.prototype.renderTextDecoration=function(t,e,n){switch(t.css("textDecoration").split(" ")[0]){case"underline":this.renderer.rectangle(e.left,Math.round(e.top+n.baseline+n.lineWidth),e.width,1,t.color("color"));break;case"overline":this.renderer.rectangle(e.left,Math.round(e.top),e.width,1,t.color("color"));break;case"line-through":this.renderer.rectangle(e.left,Math.ceil(e.top+n.middle+n.lineWidth),e.width,1,t.color("color"))}};var J={inset:[["darken",.6],["darken",.1],["darken",.1],["darken",.6]]};r.prototype.parseBorders=function(t){var e=t.parseBounds(),n=x(t),r=["Top","Right","Bottom","Left"].map(function(e,n){var r=t.css("border"+e+"Style"),i=t.color("border"+e+"Color");"inset"===r&&i.isBlack()&&(i=new V([255,255,255,i.a]));var o=J[r]?J[r][n]:null;return{width:t.cssInt("border"+e+"Width"),color:o?i[o[0]](o[1]):i,args:null}}),i=l(e,n,r);return{clip:this.parseBackgroundClip(t,i,r,n,e),borders:u(r,e,i,n)}},r.prototype.parseBackgroundClip=function(t,e,n,r,i){var o=t.css("backgroundClip"),a=[];switch(o){case"content-box":case"padding-box":h(a,r[0],r[1],e.topLeftInner,e.topRightInner,i.left+n[3].width,i.top+n[0].width),h(a,r[1],r[2],e.topRightInner,e.bottomRightInner,i.left+i.width-n[1].width,i.top+n[0].width),h(a,r[2],r[3],e.bottomRightInner,e.bottomLeftInner,i.left+i.width-n[1].width,i.top+i.height-n[2].width),h(a,r[3],r[0],e.bottomLeftInner,e.topLeftInner,i.left+n[3].width,i.top+i.height-n[2].width);break;default:h(a,r[0],r[1],e.topLeftOuter,e.topRightOuter,i.left,i.top),h(a,r[1],r[2],e.topRightOuter,e.bottomRightOuter,i.left+i.width,i.top),h(a,r[2],r[3],e.bottomRightOuter,e.bottomLeftOuter,i.left+i.width,i.top+i.height),h(a,r[3],r[0],e.bottomLeftOuter,e.topLeftOuter,i.left,i.top+i.height)}return a},e.exports=r},{"./color":3,"./fontmetrics":7,"./log":13,"./nodecontainer":14,"./pseudoelementcontainer":18,
"./stackingcontext":21,"./textcontainer":25,"./utils":26,punycode:1}],16:[function(t,e,n){function r(t,e,n){var r="withCredentials"in new XMLHttpRequest;if(!e)return Promise.reject("No proxy configured");var i=a(r),s=u(e,t,i);return r?c(s):o(n,s,i).then(function(t){return d(t.content)})}function i(t,e,n){var r="crossOrigin"in new Image,i=a(r),s=u(e,t,i);return r?Promise.resolve(s):o(n,s,i).then(function(t){return"data:"+t.type+";base64,"+t.content})}function o(t,e,n){return new Promise(function(r,i){var o=t.createElement("script"),a=function(){delete window.html2canvas.proxy[n],t.body.removeChild(o)};window.html2canvas.proxy[n]=function(t){a(),r(t)},o.src=e,o.onerror=function(t){a(),i(t)},t.body.appendChild(o)})}function a(t){return t?"":"html2canvas_"+Date.now()+"_"+ ++g+"_"+Math.round(1e5*Math.random())}function u(t,e,n){return t+"?url="+encodeURIComponent(e)+(n.length?"&callback=html2canvas.proxy."+n:"")}function s(t){return function(e){var n,r=new DOMParser;try{n=r.parseFromString(e,"text/html")}catch(i){h("DOMParser not supported, falling back to createHTMLDocument"),n=document.implementation.createHTMLDocument("");try{n.open(),n.write(e),n.close()}catch(o){h("createHTMLDocument write not supported, falling back to document.body.innerHTML"),n.body.innerHTML=e}}var a=n.querySelector("base");if(!a||!a.href.host){var u=n.createElement("base");u.href=t,n.head.insertBefore(u,n.head.firstChild)}return n}}function l(t,e,n,i,o,a){return new r(t,e,window.document).then(s(t)).then(function(t){return p(t,n,i,o,a,0,0)})}var c=t("./xhr"),f=t("./utils"),h=t("./log"),p=t("./clone"),d=f.decode64,g=0;n.Proxy=r,n.ProxyURL=i,n.loadUrlDocument=l},{"./clone":2,"./log":13,"./utils":26,"./xhr":28}],17:[function(t,e,n){function r(t,e){var n=document.createElement("a");n.href=t,t=n.href,this.src=t,this.image=new Image;var r=this;this.promise=new Promise(function(n,o){r.image.crossOrigin="Anonymous",r.image.onload=n,r.image.onerror=o,new i(t,e,document).then(function(t){r.image.src=t})["catch"](o)})}var i=t("./proxy").ProxyURL;e.exports=r},{"./proxy":16}],18:[function(t,e,n){function r(t,e,n){i.call(this,t,e),this.isPseudoElement=!0,this.before=":before"===n}var i=t("./nodecontainer");r.prototype.cloneTo=function(t){r.prototype.cloneTo.call(this,t),t.isPseudoElement=!0,t.before=this.before},r.prototype=Object.create(i.prototype),r.prototype.appendToDOM=function(){this.before?this.parent.node.insertBefore(this.node,this.parent.node.firstChild):this.parent.node.appendChild(this.node),this.parent.node.className+=" "+this.getHideClass()},r.prototype.cleanDOM=function(){this.node.parentNode.removeChild(this.node),this.parent.node.className=this.parent.node.className.replace(this.getHideClass(),"")},r.prototype.getHideClass=function(){return this["PSEUDO_HIDE_ELEMENT_CLASS_"+(this.before?"BEFORE":"AFTER")]},r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_BEFORE="___html2canvas___pseudoelement_before",r.prototype.PSEUDO_HIDE_ELEMENT_CLASS_AFTER="___html2canvas___pseudoelement_after",e.exports=r},{"./nodecontainer":14}],19:[function(t,e,n){function r(t,e,n,r,i){this.width=t,this.height=e,this.images=n,this.options=r,this.document=i}var i=t("./log");r.prototype.renderImage=function(t,e,n,r){var i=t.cssInt("paddingLeft"),o=t.cssInt("paddingTop"),a=t.cssInt("paddingRight"),u=t.cssInt("paddingBottom"),s=n.borders,l=e.width-(s[1].width+s[3].width+i+a),c=e.height-(s[0].width+s[2].width+o+u);this.drawImage(r,0,0,r.image.width||l,r.image.height||c,e.left+i+s[3].width,e.top+o+s[0].width,l,c)},r.prototype.renderBackground=function(t,e,n){e.height>0&&e.width>0&&(this.renderBackgroundColor(t,e),this.renderBackgroundImage(t,e,n))},r.prototype.renderBackgroundColor=function(t,e){var n=t.color("backgroundColor");n.isTransparent()||this.rectangle(e.left,e.top,e.width,e.height,n)},r.prototype.renderBorders=function(t){t.forEach(this.renderBorder,this)},r.prototype.renderBorder=function(t){t.color.isTransparent()||null===t.args||this.drawShape(t.args,t.color)},r.prototype.renderBackgroundImage=function(t,e,n){var r=t.parseBackgroundImages();r.reverse().forEach(function(r,o,a){switch(r.method){case"url":var u=this.images.get(r.args[0]);u?this.renderBackgroundRepeating(t,e,u,a.length-(o+1),n):i("Error loading background-image",r.args[0]);break;case"linear-gradient":case"gradient":var s=this.images.get(r.value);s?this.renderBackgroundGradient(s,e,n):i("Error loading background-image",r.args[0]);break;case"none":break;default:i("Unknown background-image type",r.args[0])}},this)},r.prototype.renderBackgroundRepeating=function(t,e,n,r,i){var o=t.parseBackgroundSize(e,n.image,r),a=t.parseBackgroundPosition(e,n.image,r,o),u=t.parseBackgroundRepeat(r);switch(u){case"repeat-x":case"repeat no-repeat":this.backgroundRepeatShape(n,a,o,e,e.left+i[3],e.top+a.top+i[0],99999,o.height,i);break;case"repeat-y":case"no-repeat repeat":this.backgroundRepeatShape(n,a,o,e,e.left+a.left+i[3],e.top+i[0],o.width,99999,i);break;case"no-repeat":this.backgroundRepeatShape(n,a,o,e,e.left+a.left+i[3],e.top+a.top+i[0],o.width,o.height,i);break;default:this.renderBackgroundRepeat(n,a,o,{top:e.top,left:e.left},i[3],i[0])}},e.exports=r},{"./log":13}],20:[function(t,e,n){function r(t,e){o.apply(this,arguments),this.canvas=this.options.canvas||this.document.createElement("canvas"),this.options.canvas||(this.canvas.width=t,this.canvas.height=e),this.ctx=this.canvas.getContext("2d"),this.taintCtx=this.document.createElement("canvas").getContext("2d"),this.ctx.textBaseline="bottom",this.variables={},u("Initialized CanvasRenderer with size",t,"x",e)}function i(t){return t.length>0}var o=t("../renderer"),a=t("../lineargradientcontainer"),u=t("../log");r.prototype=Object.create(o.prototype),r.prototype.setFillStyle=function(t){return this.ctx.fillStyle="object"==typeof t&&t.isColor?t.toString():t,this.ctx},r.prototype.rectangle=function(t,e,n,r,i){this.setFillStyle(i).fillRect(t,e,n,r)},r.prototype.circle=function(t,e,n,r){this.setFillStyle(r),this.ctx.beginPath(),this.ctx.arc(t+n/2,e+n/2,n/2,0,2*Math.PI,!0),this.ctx.closePath(),this.ctx.fill()},r.prototype.circleStroke=function(t,e,n,r,i,o){this.circle(t,e,n,r),this.ctx.strokeStyle=o.toString(),this.ctx.stroke()},r.prototype.drawShape=function(t,e){this.shape(t),this.setFillStyle(e).fill()},r.prototype.taints=function(t){if(null===t.tainted){this.taintCtx.drawImage(t.image,0,0);try{this.taintCtx.getImageData(0,0,1,1),t.tainted=!1}catch(e){this.taintCtx=document.createElement("canvas").getContext("2d"),t.tainted=!0}}return t.tainted},r.prototype.drawImage=function(t,e,n,r,i,o,a,u,s){(!this.taints(t)||this.options.allowTaint)&&this.ctx.drawImage(t.image,e,n,r,i,o,a,u,s)},r.prototype.clip=function(t,e,n){this.ctx.save(),t.filter(i).forEach(function(t){this.shape(t).clip()},this),e.call(n),this.ctx.restore()},r.prototype.shape=function(t){return this.ctx.beginPath(),t.forEach(function(t,e){"rect"===t[0]?this.ctx.rect.apply(this.ctx,t.slice(1)):this.ctx[0===e?"moveTo":t[0]+"To"].apply(this.ctx,t.slice(1))},this),this.ctx.closePath(),this.ctx},r.prototype.font=function(t,e,n,r,i,o){this.setFillStyle(t).font=[e,n,r,i,o].join(" ").split(",")[0]},r.prototype.fontShadow=function(t,e,n,r){this.setVariable("shadowColor",t.toString()).setVariable("shadowOffsetY",e).setVariable("shadowOffsetX",n).setVariable("shadowBlur",r)},r.prototype.clearShadow=function(){this.setVariable("shadowColor","rgba(0,0,0,0)")},r.prototype.setOpacity=function(t){this.ctx.globalAlpha=t},r.prototype.setTransform=function(t){this.ctx.translate(t.origin[0],t.origin[1]),this.ctx.transform.apply(this.ctx,t.matrix),this.ctx.translate(-t.origin[0],-t.origin[1])},r.prototype.setVariable=function(t,e){return this.variables[t]!==e&&(this.variables[t]=this.ctx[t]=e),this},r.prototype.text=function(t,e,n){this.ctx.fillText(t,e,n)},r.prototype.backgroundRepeatShape=function(t,e,n,r,i,o,a,u,s){var l=[["line",Math.round(i),Math.round(o)],["line",Math.round(i+a),Math.round(o)],["line",Math.round(i+a),Math.round(u+o)],["line",Math.round(i),Math.round(u+o)]];this.clip([l],function(){this.renderBackgroundRepeat(t,e,n,r,s[3],s[0])},this)},r.prototype.renderBackgroundRepeat=function(t,e,n,r,i,o){var a=Math.round(r.left+e.left+i),u=Math.round(r.top+e.top+o);this.setFillStyle(this.ctx.createPattern(this.resizeImage(t,n),"repeat")),this.ctx.translate(a,u),this.ctx.fill(),this.ctx.translate(-a,-u)},r.prototype.renderBackgroundGradient=function(t,e){if(t instanceof a){var n=this.ctx.createLinearGradient(e.left+e.width*t.x0,e.top+e.height*t.y0,e.left+e.width*t.x1,e.top+e.height*t.y1);t.colorStops.forEach(function(t){n.addColorStop(t.stop,t.color.toString())}),this.rectangle(e.left,e.top,e.width,e.height,n)}},r.prototype.resizeImage=function(t,e){var n=t.image;if(n.width===e.width&&n.height===e.height)return n;var r,i=document.createElement("canvas");return i.width=e.width,i.height=e.height,r=i.getContext("2d"),r.drawImage(n,0,0,n.width,n.height,0,0,e.width,e.height),i},e.exports=r},{"../lineargradientcontainer":12,"../log":13,"../renderer":19}],21:[function(t,e,n){function r(t,e,n,r){i.call(this,n,r),this.ownStacking=t,this.contexts=[],this.children=[],this.opacity=(this.parent?this.parent.stack.opacity:1)*e}var i=t("./nodecontainer");r.prototype=Object.create(i.prototype),r.prototype.getParentStack=function(t){var e=this.parent?this.parent.stack:null;return e?e.ownStacking?e:e.getParentStack(t):t.stack},e.exports=r},{"./nodecontainer":14}],22:[function(t,e,n){function r(t){this.rangeBounds=this.testRangeBounds(t),this.cors=this.testCORS(),this.svg=this.testSVG()}r.prototype.testRangeBounds=function(t){var e,n,r,i,o=!1;return t.createRange&&(e=t.createRange(),e.getBoundingClientRect&&(n=t.createElement("boundtest"),n.style.height="123px",n.style.display="block",t.body.appendChild(n),e.selectNode(n),r=e.getBoundingClientRect(),i=r.height,123===i&&(o=!0),t.body.removeChild(n))),o},r.prototype.testCORS=function(){return"undefined"!=typeof(new Image).crossOrigin},r.prototype.testSVG=function(){var t=new Image,e=document.createElement("canvas"),n=e.getContext("2d");t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{n.drawImage(t,0,0),e.toDataURL()}catch(r){return!1}return!0},e.exports=r},{}],23:[function(t,e,n){function r(t){this.src=t,this.image=null;var e=this;this.promise=this.hasFabric().then(function(){return e.isInline(t)?Promise.resolve(e.inlineFormatting(t)):i(t)}).then(function(t){return new Promise(function(n){window.html2canvas.svg.fabric.loadSVGFromString(t,e.createCanvas.call(e,n))})})}var i=t("./xhr"),o=t("./utils").decode64;r.prototype.hasFabric=function(){return window.html2canvas.svg&&window.html2canvas.svg.fabric?Promise.resolve():Promise.reject(new Error("html2canvas.svg.js is not loaded, cannot render svg"))},r.prototype.inlineFormatting=function(t){return/^data:image\/svg\+xml;base64,/.test(t)?this.decode64(this.removeContentType(t)):this.removeContentType(t)},r.prototype.removeContentType=function(t){return t.replace(/^data:image\/svg\+xml(;base64)?,/,"")},r.prototype.isInline=function(t){return/^data:image\/svg\+xml/i.test(t)},r.prototype.createCanvas=function(t){var e=this;return function(n,r){var i=new window.html2canvas.svg.fabric.StaticCanvas("c");e.image=i.lowerCanvasEl,i.setWidth(r.width).setHeight(r.height).add(window.html2canvas.svg.fabric.util.groupSVGElements(n,r)).renderAll(),t(i.lowerCanvasEl)}},r.prototype.decode64=function(t){return"function"==typeof window.atob?window.atob(t):o(t)},e.exports=r},{"./utils":26,"./xhr":28}],24:[function(t,e,n){function r(t,e){this.src=t,this.image=null;var n=this;this.promise=e?new Promise(function(e,r){n.image=new Image,n.image.onload=e,n.image.onerror=r,n.image.src="data:image/svg+xml,"+(new XMLSerializer).serializeToString(t),n.image.complete===!0&&e(n.image)}):this.hasFabric().then(function(){return new Promise(function(e){window.html2canvas.svg.fabric.parseSVGDocument(t,n.createCanvas.call(n,e))})})}var i=t("./svgcontainer");r.prototype=Object.create(i.prototype),e.exports=r},{"./svgcontainer":23}],25:[function(t,e,n){function r(t,e){o.call(this,t,e)}function i(t,e,n){return t.length>0?e+n.toUpperCase():void 0}var o=t("./nodecontainer");r.prototype=Object.create(o.prototype),r.prototype.applyTextTransform=function(){this.node.data=this.transform(this.parent.css("textTransform"))},r.prototype.transform=function(t){var e=this.node.data;switch(t){case"lowercase":return e.toLowerCase();case"capitalize":return e.replace(/(^|\s|:|-|\(|\))([a-z])/g,i);case"uppercase":return e.toUpperCase();default:return e}},e.exports=r},{"./nodecontainer":14}],26:[function(t,e,n){n.smallImage=function(){return""},n.bind=function(t,e){return function(){return t.apply(e,arguments)}},n.decode64=function(t){var e,n,r,i,o,a,u,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=t.length,f="";for(e=0;c>e;e+=4)n=l.indexOf(t[e]),r=l.indexOf(t[e+1]),i=l.indexOf(t[e+2]),o=l.indexOf(t[e+3]),a=n<<2|r>>4,u=(15&r)<<4|i>>2,s=(3&i)<<6|o,f+=64===i?String.fromCharCode(a):64===o||-1===o?String.fromCharCode(a,u):String.fromCharCode(a,u,s);return f},n.getBounds=function(t){if(t.getBoundingClientRect){var e=t.getBoundingClientRect(),n=null==t.offsetWidth?e.width:t.offsetWidth;return{top:e.top,bottom:e.bottom||e.top+e.height,right:e.left+n,left:e.left,width:n,height:null==t.offsetHeight?e.height:t.offsetHeight}}return{}},n.offsetBounds=function(t){var e=t.offsetParent?n.offsetBounds(t.offsetParent):{top:0,left:0};return{top:t.offsetTop+e.top,bottom:t.offsetTop+t.offsetHeight+e.top,right:t.offsetLeft+e.left+t.offsetWidth,left:t.offsetLeft+e.left,width:t.offsetWidth,height:t.offsetHeight}},n.parseBackgrounds=function(t){var e,n,r,i,o,a,u,s=" \r\n	",l=[],c=0,f=0,h=function(){e&&('"'===n.substr(0,1)&&(n=n.substr(1,n.length-2)),n&&u.push(n),"-"===e.substr(0,1)&&(i=e.indexOf("-",1)+1)>0&&(r=e.substr(0,i),e=e.substr(i)),l.push({prefix:r,method:e.toLowerCase(),value:o,args:u,image:null})),u=[],e=r=n=o=""};return u=[],e=r=n=o="",t.split("").forEach(function(t){if(!(0===c&&s.indexOf(t)>-1)){switch(t){case'"':a?a===t&&(a=null):a=t;break;case"(":if(a)break;if(0===c)return c=1,void(o+=t);f++;break;case")":if(a)break;if(1===c){if(0===f)return c=0,o+=t,void h();f--}break;case",":if(a)break;if(0===c)return void h();if(1===c&&0===f&&!e.match(/^url$/i))return u.push(n),n="",void(o+=t)}o+=t,0===c?e+=t:n+=t}}),h(),l}},{}],27:[function(t,e,n){function r(t){i.apply(this,arguments),this.type="linear"===t.args[0]?i.TYPES.LINEAR:i.TYPES.RADIAL}var i=t("./gradientcontainer");r.prototype=Object.create(i.prototype),e.exports=r},{"./gradientcontainer":9}],28:[function(t,e,n){function r(t){return new Promise(function(e,n){var r=new XMLHttpRequest;r.open("GET",t),r.onload=function(){200===r.status?e(r.responseText):n(new Error(r.statusText))},r.onerror=function(){n(new Error("Network Error"))},r.send()})}e.exports=r},{}]},{},[4])(4)})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],11:[function(t,e,n){"function"!=typeof Function.prototype.bind&&(Function.prototype.bind=function(t){var e=Array.prototype.slice.call(arguments,1),n=this,r=function(){},i=function(){return n.apply(this instanceof r?this:t||{},e.concat(Array.prototype.slice.call(arguments)))};return r.prototype=this.prototype||{},i.prototype=new r,i})},{}],12:[function(e,n,r){(function(){function e(t){function e(e,n,r,i,o,a){for(;o>=0&&a>o;o+=t){var u=i?i[o]:o;r=n(r,e[u],u,e)}return r}return function(n,r,i,o){r=k(r,o,4);var a=!N(n)&&w.keys(n),u=(a||n).length,s=t>0?0:u-1;return arguments.length<3&&(i=n[a?a[s]:s],s+=t),e(n,r,i,a,s,u)}}function i(t){return function(e,n,r){n=M(n,r);for(var i=T(e),o=t>0?0:i-1;o>=0&&i>o;o+=t)if(n(e[o],o,e))return o;return-1}}function o(t,e,n){return function(r,i,o){var a=0,u=T(r);if("number"==typeof o)t>0?a=o>=0?o:Math.max(o+u,a):u=o>=0?Math.min(o+1,u):o+u+1;else if(n&&o&&u)return o=n(r,i),r[o]===i?o:-1;if(i!==i)return o=e(p.call(r,a,u),w.isNaN),o>=0?o+a:-1;for(o=t>0?a:u-1;o>=0&&u>o;o+=t)if(r[o]===i)return o;return-1}}function a(t,e){var n=L.length,r=t.constructor,i=w.isFunction(r)&&r.prototype||c,o="constructor";for(w.has(t,o)&&!w.contains(e,o)&&e.push(o);n--;)o=L[n],o in t&&t[o]!==i[o]&&!w.contains(e,o)&&e.push(o)}var u=this,s=u._,l=Array.prototype,c=Object.prototype,f=Function.prototype,h=l.push,p=l.slice,d=c.toString,g=c.hasOwnProperty,v=Array.isArray,m=Object.keys,y=f.bind,b=Object.create,x=function(){},w=function(t){return t instanceof w?t:this instanceof w?void(this._wrapped=t):new w(t)};"undefined"!=typeof r?("undefined"!=typeof n&&n.exports&&(r=n.exports=w),r._=w):u._=w,w.VERSION="1.8.3";var k=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)};case 4:return function(n,r,i,o){return t.call(e,n,r,i,o)}}return function(){return t.apply(e,arguments)}},M=function(t,e,n){return null==t?w.identity:w.isFunction(t)?k(t,e,n):w.isObject(t)?w.matcher(t):w.property(t)};w.iteratee=function(t,e){return M(t,e,1/0)};var _=function(t,e){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var i=1;r>i;i++)for(var o=arguments[i],a=t(o),u=a.length,s=0;u>s;s++){var l=a[s];e&&void 0!==n[l]||(n[l]=o[l])}return n}},E=function(t){if(!w.isObject(t))return{};if(b)return b(t);x.prototype=t;var e=new x;return x.prototype=null,e},C=function(t){return function(e){return null==e?void 0:e[t]}},S=Math.pow(2,53)-1,T=C("length"),N=function(t){var e=T(t);return"number"==typeof e&&e>=0&&S>=e};w.each=w.forEach=function(t,e,n){e=k(e,n);var r,i;if(N(t))for(r=0,i=t.length;i>r;r++)e(t[r],r,t);else{var o=w.keys(t);for(r=0,i=o.length;i>r;r++)e(t[o[r]],o[r],t)}return t},w.map=w.collect=function(t,e,n){e=M(e,n);for(var r=!N(t)&&w.keys(t),i=(r||t).length,o=Array(i),a=0;i>a;a++){var u=r?r[a]:a;o[a]=e(t[u],u,t)}return o},w.reduce=w.foldl=w.inject=e(1),w.reduceRight=w.foldr=e(-1),w.find=w.detect=function(t,e,n){var r;return r=N(t)?w.findIndex(t,e,n):w.findKey(t,e,n),void 0!==r&&-1!==r?t[r]:void 0},w.filter=w.select=function(t,e,n){var r=[];return e=M(e,n),w.each(t,function(t,n,i){e(t,n,i)&&r.push(t)}),r},w.reject=function(t,e,n){return w.filter(t,w.negate(M(e)),n)},w.every=w.all=function(t,e,n){e=M(e,n);for(var r=!N(t)&&w.keys(t),i=(r||t).length,o=0;i>o;o++){var a=r?r[o]:o;if(!e(t[a],a,t))return!1}return!0},w.some=w.any=function(t,e,n){e=M(e,n);for(var r=!N(t)&&w.keys(t),i=(r||t).length,o=0;i>o;o++){var a=r?r[o]:o;if(e(t[a],a,t))return!0}return!1},w.contains=w.includes=w.include=function(t,e,n,r){return N(t)||(t=w.values(t)),("number"!=typeof n||r)&&(n=0),w.indexOf(t,e,n)>=0},w.invoke=function(t,e){var n=p.call(arguments,2),r=w.isFunction(e);return w.map(t,function(t){var i=r?e:t[e];return null==i?i:i.apply(t,n)})},w.pluck=function(t,e){return w.map(t,w.property(e))},w.where=function(t,e){return w.filter(t,w.matcher(e))},w.findWhere=function(t,e){return w.find(t,w.matcher(e))},w.max=function(t,e,n){var r,i,o=-(1/0),a=-(1/0);if(null==e&&null!=t){t=N(t)?t:w.values(t);for(var u=0,s=t.length;s>u;u++)r=t[u],r>o&&(o=r)}else e=M(e,n),w.each(t,function(t,n,r){i=e(t,n,r),(i>a||i===-(1/0)&&o===-(1/0))&&(o=t,a=i)});return o},w.min=function(t,e,n){var r,i,o=1/0,a=1/0;if(null==e&&null!=t){t=N(t)?t:w.values(t);for(var u=0,s=t.length;s>u;u++)r=t[u],o>r&&(o=r)}else e=M(e,n),w.each(t,function(t,n,r){i=e(t,n,r),(a>i||i===1/0&&o===1/0)&&(o=t,a=i)});return o},w.shuffle=function(t){for(var e,n=N(t)?t:w.values(t),r=n.length,i=Array(r),o=0;r>o;o++)e=w.random(0,o),e!==o&&(i[o]=i[e]),i[e]=n[o];return i},w.sample=function(t,e,n){return null==e||n?(N(t)||(t=w.values(t)),t[w.random(t.length-1)]):w.shuffle(t).slice(0,Math.max(0,e))},w.sortBy=function(t,e,n){return e=M(e,n),w.pluck(w.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index-e.index}),"value")};var O=function(t){return function(e,n,r){var i={};return n=M(n,r),w.each(e,function(r,o){var a=n(r,o,e);t(i,r,a)}),i}};w.groupBy=O(function(t,e,n){w.has(t,n)?t[n].push(e):t[n]=[e]}),w.indexBy=O(function(t,e,n){t[n]=e}),w.countBy=O(function(t,e,n){w.has(t,n)?t[n]++:t[n]=1}),w.toArray=function(t){return t?w.isArray(t)?p.call(t):N(t)?w.map(t,w.identity):w.values(t):[]},w.size=function(t){return null==t?0:N(t)?t.length:w.keys(t).length},w.partition=function(t,e,n){e=M(e,n);var r=[],i=[];return w.each(t,function(t,n,o){(e(t,n,o)?r:i).push(t)}),[r,i]},w.first=w.head=w.take=function(t,e,n){return null!=t?null==e||n?t[0]:w.initial(t,t.length-e):void 0},w.initial=function(t,e,n){return p.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},w.last=function(t,e,n){return null!=t?null==e||n?t[t.length-1]:w.rest(t,Math.max(0,t.length-e)):void 0},w.rest=w.tail=w.drop=function(t,e,n){return p.call(t,null==e||n?1:e)},w.compact=function(t){return w.filter(t,w.identity)};var A=function(t,e,n,r){for(var i=[],o=0,a=r||0,u=T(t);u>a;a++){var s=t[a];if(N(s)&&(w.isArray(s)||w.isArguments(s))){e||(s=A(s,e,n));var l=0,c=s.length;for(i.length+=c;c>l;)i[o++]=s[l++]}else n||(i[o++]=s)}return i};w.flatten=function(t,e){return A(t,e,!1)},w.without=function(t){return w.difference(t,p.call(arguments,1))},w.uniq=w.unique=function(t,e,n,r){w.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=M(n,r));for(var i=[],o=[],a=0,u=T(t);u>a;a++){var s=t[a],l=n?n(s,a,t):s;e?(a&&o===l||i.push(s),o=l):n?w.contains(o,l)||(o.push(l),i.push(s)):w.contains(i,s)||i.push(s)}return i},w.union=function(){return w.uniq(A(arguments,!0,!0))},w.intersection=function(t){for(var e=[],n=arguments.length,r=0,i=T(t);i>r;r++){var o=t[r];if(!w.contains(e,o)){for(var a=1;n>a&&w.contains(arguments[a],o);a++);a===n&&e.push(o)}}return e},w.difference=function(t){var e=A(arguments,!0,!0,1);return w.filter(t,function(t){return!w.contains(e,t)})},w.zip=function(){return w.unzip(arguments)},w.unzip=function(t){for(var e=t&&w.max(t,T).length||0,n=Array(e),r=0;e>r;r++)n[r]=w.pluck(t,r);return n},w.object=function(t,e){for(var n={},r=0,i=T(t);i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},w.findIndex=i(1),w.findLastIndex=i(-1),w.sortedIndex=function(t,e,n,r){n=M(n,r,1);for(var i=n(e),o=0,a=T(t);a>o;){var u=Math.floor((o+a)/2);n(t[u])<i?o=u+1:a=u}return o},w.indexOf=o(1,w.findIndex,w.sortedIndex),w.lastIndexOf=o(-1,w.findLastIndex),w.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=Array(r),o=0;r>o;o++,t+=n)i[o]=t;return i};var j=function(t,e,n,r,i){if(!(r instanceof e))return t.apply(n,i);var o=E(t.prototype),a=t.apply(o,i);return w.isObject(a)?a:o};w.bind=function(t,e){if(y&&t.bind===y)return y.apply(t,p.call(arguments,1));if(!w.isFunction(t))throw new TypeError("Bind must be called on a function");var n=p.call(arguments,2),r=function(){return j(t,r,e,this,n.concat(p.call(arguments)))};return r},w.partial=function(t){var e=p.call(arguments,1),n=function(){for(var r=0,i=e.length,o=Array(i),a=0;i>a;a++)o[a]=e[a]===w?arguments[r++]:e[a];for(;r<arguments.length;)o.push(arguments[r++]);return j(t,n,this,this,o)};return n},w.bindAll=function(t){var e,n,r=arguments.length;if(1>=r)throw new Error("bindAll must be passed function names");for(e=1;r>e;e++)n=arguments[e],t[n]=w.bind(t[n],t);return t},w.memoize=function(t,e){var n=function(r){var i=n.cache,o=""+(e?e.apply(this,arguments):r);return w.has(i,o)||(i[o]=t.apply(this,arguments)),i[o]};return n.cache={},n},w.delay=function(t,e){var n=p.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},w.defer=w.partial(w.delay,w,1),w.throttle=function(t,e,n){var r,i,o,a=null,u=0;n||(n={});var s=function(){u=n.leading===!1?0:w.now(),a=null,o=t.apply(r,i),a||(r=i=null)};return function(){var l=w.now();u||n.leading!==!1||(u=l);var c=e-(l-u);return r=this,i=arguments,0>=c||c>e?(a&&(clearTimeout(a),a=null),u=l,o=t.apply(r,i),a||(r=i=null)):a||n.trailing===!1||(a=setTimeout(s,c)),o}},w.debounce=function(t,e,n){var r,i,o,a,u,s=function(){var l=w.now()-a;e>l&&l>=0?r=setTimeout(s,e-l):(r=null,n||(u=t.apply(o,i),r||(o=i=null)))};return function(){o=this,i=arguments,a=w.now();var l=n&&!r;return r||(r=setTimeout(s,e)),l&&(u=t.apply(o,i),o=i=null),u}},w.wrap=function(t,e){return w.partial(e,t)},w.negate=function(t){return function(){return!t.apply(this,arguments)}},w.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},w.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},w.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}},w.once=w.partial(w.before,2);var P=!{toString:null}.propertyIsEnumerable("toString"),L=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];w.keys=function(t){if(!w.isObject(t))return[];if(m)return m(t);var e=[];for(var n in t)w.has(t,n)&&e.push(n);return P&&a(t,e),e},w.allKeys=function(t){if(!w.isObject(t))return[];var e=[];for(var n in t)e.push(n);return P&&a(t,e),e},w.values=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=t[e[i]];return r},w.mapObject=function(t,e,n){e=M(e,n);for(var r,i=w.keys(t),o=i.length,a={},u=0;o>u;u++)r=i[u],a[r]=e(t[r],r,t);return a},w.pairs=function(t){for(var e=w.keys(t),n=e.length,r=Array(n),i=0;n>i;i++)r[i]=[e[i],t[e[i]]];return r},w.invert=function(t){for(var e={},n=w.keys(t),r=0,i=n.length;i>r;r++)e[t[n[r]]]=n[r];return e},w.functions=w.methods=function(t){var e=[];for(var n in t)w.isFunction(t[n])&&e.push(n);return e.sort()},w.extend=_(w.allKeys),w.extendOwn=w.assign=_(w.keys),w.findKey=function(t,e,n){e=M(e,n);for(var r,i=w.keys(t),o=0,a=i.length;a>o;o++)if(r=i[o],e(t[r],r,t))return r},w.pick=function(t,e,n){var r,i,o={},a=t;if(null==a)return o;w.isFunction(e)?(i=w.allKeys(a),r=k(e,n)):(i=A(arguments,!1,!1,1),r=function(t,e,n){return e in n},a=Object(a));for(var u=0,s=i.length;s>u;u++){var l=i[u],c=a[l];r(c,l,a)&&(o[l]=c)}return o},w.omit=function(t,e,n){if(w.isFunction(e))e=w.negate(e);else{var r=w.map(A(arguments,!1,!1,1),String);e=function(t,e){return!w.contains(r,e)}}return w.pick(t,e,n)},w.defaults=_(w.allKeys,!0),w.create=function(t,e){var n=E(t);return e&&w.extendOwn(n,e),n},w.clone=function(t){return w.isObject(t)?w.isArray(t)?t.slice():w.extend({},t):t},w.tap=function(t,e){return e(t),t},w.isMatch=function(t,e){var n=w.keys(e),r=n.length;if(null==t)return!r;for(var i=Object(t),o=0;r>o;o++){var a=n[o];if(e[a]!==i[a]||!(a in i))return!1}return!0};var D=function(t,e,n,r){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof w&&(t=t._wrapped),e instanceof w&&(e=e._wrapped);var i=d.call(t);if(i!==d.call(e))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}var o="[object Array]"===i;if(!o){if("object"!=typeof t||"object"!=typeof e)return!1;var a=t.constructor,u=e.constructor;if(a!==u&&!(w.isFunction(a)&&a instanceof a&&w.isFunction(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],r=r||[];for(var s=n.length;s--;)if(n[s]===t)return r[s]===e;if(n.push(t),r.push(e),o){if(s=t.length,s!==e.length)return!1;for(;s--;)if(!D(t[s],e[s],n,r))return!1}else{var l,c=w.keys(t);if(s=c.length,w.keys(e).length!==s)return!1;for(;s--;)if(l=c[s],!w.has(e,l)||!D(t[l],e[l],n,r))return!1}return n.pop(),r.pop(),!0};w.isEqual=function(t,e){return D(t,e)},w.isEmpty=function(t){return null==t||(N(t)&&(w.isArray(t)||w.isString(t)||w.isArguments(t))?0===t.length:0===w.keys(t).length)},w.isElement=function(t){return!(!t||1!==t.nodeType)},w.isArray=v||function(t){return"[object Array]"===d.call(t)},w.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},w.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){w["is"+t]=function(e){return d.call(e)==="[object "+t+"]"}}),w.isArguments(arguments)||(w.isArguments=function(t){return w.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(w.isFunction=function(t){return"function"==typeof t||!1}),w.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},w.isNaN=function(t){return w.isNumber(t)&&t!==+t},w.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===d.call(t)},w.isNull=function(t){return null===t},w.isUndefined=function(t){return void 0===t},w.has=function(t,e){return null!=t&&g.call(t,e)},w.noConflict=function(){return u._=s,this},w.identity=function(t){return t},w.constant=function(t){return function(){return t}},w.noop=function(){},w.property=C,w.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},w.matcher=w.matches=function(t){return t=w.extendOwn({},t),function(e){return w.isMatch(e,t)}},w.times=function(t,e,n){var r=Array(Math.max(0,t));e=k(e,n,1);for(var i=0;t>i;i++)r[i]=e(i);return r},w.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},w.now=Date.now||function(){return(new Date).getTime()};var R={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},I=w.invert(R),q=function(t){var e=function(e){return t[e]},n="(?:"+w.keys(t).join("|")+")",r=RegExp(n),i=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(i,e):t}};w.escape=q(R),w.unescape=q(I),w.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),w.isFunction(r)?r.call(t):r};var F=0;w.uniqueId=function(t){var e=++F+"";return t?t+e:e},w.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,z={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},H=/\\|'|\r|\n|\u2028|\u2029/g,W=function(t){return"\\"+z[t]};w.template=function(t,e,n){!e&&n&&(e=n),e=w.defaults({},e,w.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),i=0,o="__p+='";t.replace(r,function(e,n,r,a,u){return o+=t.slice(i,u).replace(H,W),i=u+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),e}),o+="';\n",e.variable||(o="with(obj||{}){\n"+o+"}\n"),o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{var a=new Function(e.variable||"obj","_",o)}catch(u){throw u.source=o,u}var s=function(t){return a.call(this,t,w)},l=e.variable||"obj";return s.source="function("+l+"){\n"+o+"}",s},w.chain=function(t){var e=w(t);return e._chain=!0,e};var U=function(t,e){return t._chain?w(e).chain():e};w.mixin=function(t){w.each(w.functions(t),function(e){var n=w[e]=t[e];w.prototype[e]=function(){var t=[this._wrapped];return h.apply(t,arguments),U(this,n.apply(w,t))}})},w.mixin(w),w.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=l[t];w.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],U(this,n)}}),w.each(["concat","join","slice"],function(t){var e=l[t];w.prototype[t]=function(){return U(this,e.apply(this._wrapped,arguments))}}),w.prototype.value=function(){return this._wrapped},w.prototype.valueOf=w.prototype.toJSON=w.prototype.value,w.prototype.toString=function(){return""+this._wrapped},"function"==typeof t&&t.amd&&t("underscore",[],function(){return w})}).call(this)},{}],13:[function(t,e,n){(function(t){var n;if(t.crypto&&crypto.getRandomValues){var r=new Uint8Array(16);n=function(){return crypto.getRandomValues(r),r}}if(!n){var i=new Array(16);n=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),i[e]=t>>>((3&e)<<3)&255;return i}}e.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(t,e,n){
function r(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>i&&(e[r+i++]=l[t])});16>i;)e[r+i++]=0;return e}function i(t,e){var n=e||0,r=s;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function o(t,e,n){var r=e&&n||0,o=e||[];t=t||{};var a=void 0!==t.clockseq?t.clockseq:p,u=void 0!==t.msecs?t.msecs:(new Date).getTime(),s=void 0!==t.nsecs?t.nsecs:g+1,l=u-d+(s-g)/1e4;if(0>l&&void 0===t.clockseq&&(a=a+1&16383),(0>l||u>d)&&void 0===t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");d=u,g=s,p=a,u+=122192928e5;var c=(1e4*(268435455&u)+s)%4294967296;o[r++]=c>>>24&255,o[r++]=c>>>16&255,o[r++]=c>>>8&255,o[r++]=255&c;var f=u/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var v=t.node||h,m=0;6>m;m++)o[r+m]=v[m];return e?e:i(o)}function a(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"==t?new Array(16):null,t=null),t=t||{};var o=t.random||(t.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var a=0;16>a;a++)e[r+a]=o[a];return e||i(o)}for(var u=t("./rng"),s=[],l={},c=0;256>c;c++)s[c]=(c+256).toString(16).substr(1),l[s[c]]=c;var f=u(),h=[1|f[0],f[1],f[2],f[3],f[4],f[5]],p=16383&(f[6]<<8|f[7]),d=0,g=0,v=a;v.v1=o,v.v4=a,v.parse=r,v.unparse=i,e.exports=v},{"./rng":13}],15:[function(e,n,r){!function(){function e(t,e,n){return t.call.apply(t.bind,arguments)}function r(t,e,n){if(!t)throw Error();if(2<arguments.length){var r=Array.prototype.slice.call(arguments,2);return function(){var n=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(n,r),t.apply(e,n)}}return function(){return t.apply(e,arguments)}}function i(t,n,o){return i=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?e:r,i.apply(null,arguments)}function o(t,e){this.a=t,this.m=e||t,this.c=this.m.document}function a(t,e,n,r){if(e=t.c.createElement(e),n)for(var i in n)n.hasOwnProperty(i)&&("style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r&&e.appendChild(t.c.createTextNode(r)),e}function u(t,e,n){t=t.c.getElementsByTagName(e)[0],t||(t=document.documentElement),t.insertBefore(n,t.lastChild)}function s(t){t.parentNode&&t.parentNode.removeChild(t)}function l(t,e,n){e=e||[],n=n||[];for(var r=t.className.split(/\s+/),i=0;i<e.length;i+=1){for(var o=!1,a=0;a<r.length;a+=1)if(e[i]===r[a]){o=!0;break}o||r.push(e[i])}for(e=[],i=0;i<r.length;i+=1){for(o=!1,a=0;a<n.length;a+=1)if(r[i]===n[a]){o=!0;break}o||e.push(r[i])}t.className=e.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function c(t,e){for(var n=t.className.split(/\s+/),r=0,i=n.length;i>r;r++)if(n[r]==e)return!0;return!1}function f(t){if("string"==typeof t.f)return t.f;var e=t.m.location.protocol;return"about:"==e&&(e=t.a.location.protocol),"https:"==e?"https:":"http:"}function h(t){return t.m.location.hostname||t.a.location.hostname}function p(t,e,n){function r(){l&&i&&o&&(l(s),l=null)}e=a(t,"link",{rel:"stylesheet",href:e,media:"all"});var i=!1,o=!0,s=null,l=n||null;ot?(e.onload=function(){i=!0,r()},e.onerror=function(){i=!0,s=Error("Stylesheet failed to load"),r()}):setTimeout(function(){i=!0,r()},0),u(t,"head",e)}function d(t,e,n,r){var i=t.c.getElementsByTagName("head")[0];if(i){var o=a(t,"script",{src:e}),u=!1;return o.onload=o.onreadystatechange=function(){u||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(u=!0,n&&n(null),o.onload=o.onreadystatechange=null,"HEAD"==o.parentNode.tagName&&i.removeChild(o))},i.appendChild(o),setTimeout(function(){u||(u=!0,n&&n(Error("Script load timeout")))},r||5e3),o}return null}function g(){this.a=0,this.c=null}function v(t){return t.a++,function(){t.a--,y(t)}}function m(t,e){t.c=e,y(t)}function y(t){0==t.a&&t.c&&(t.c(),t.c=null)}function b(t){this.a=t||"-"}function x(t,e){this.c=t,this.f=4,this.a="n";var n=(e||"n4").match(/^([nio])([1-9])$/i);n&&(this.a=n[1],this.f=parseInt(n[2],10))}function w(t){return _(t)+" "+(t.f+"00")+" 300px "+k(t.c)}function k(t){var e=[];t=t.split(/,\s*/);for(var n=0;n<t.length;n++){var r=t[n].replace(/['"]/g,"");-1!=r.indexOf(" ")||/^\d/.test(r)?e.push("'"+r+"'"):e.push(r)}return e.join(",")}function M(t){return t.a+t.f}function _(t){var e="normal";return"o"===t.a?e="oblique":"i"===t.a&&(e="italic"),e}function E(t){var e=4,n="n",r=null;return t&&((r=t.match(/(normal|oblique|italic)/i))&&r[1]&&(n=r[1].substr(0,1).toLowerCase()),(r=t.match(/([1-9]00|normal|bold)/i))&&r[1]&&(/bold/i.test(r[1])?e=7:/[1-9]00/.test(r[1])&&(e=parseInt(r[1].substr(0,1),10)))),n+e}function C(t,e){this.c=t,this.f=t.m.document.documentElement,this.h=e,this.a=new b("-"),this.j=!1!==e.events,this.g=!1!==e.classes}function S(t){t.g&&l(t.f,[t.a.c("wf","loading")]),N(t,"loading")}function T(t){if(t.g){var e=c(t.f,t.a.c("wf","active")),n=[],r=[t.a.c("wf","loading")];e||n.push(t.a.c("wf","inactive")),l(t.f,n,r)}N(t,"inactive")}function N(t,e,n){t.j&&t.h[e]&&(n?t.h[e](n.c,M(n)):t.h[e]())}function O(){this.c={}}function A(t,e,n){var r,i=[];for(r in e)if(e.hasOwnProperty(r)){var o=t.c[r];o&&i.push(o(e[r],n))}return i}function j(t,e){this.c=t,this.f=e,this.a=a(this.c,"span",{"aria-hidden":"true"},this.f)}function P(t){u(t.c,"body",t.a)}function L(t){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+k(t.c)+";"+("font-style:"+_(t)+";font-weight:"+(t.f+"00")+";")}function D(t,e,n,r,i,o){this.g=t,this.j=e,this.a=r,this.c=n,this.f=i||3e3,this.h=o||void 0}function R(t,e,n,r,i,o,a){this.v=t,this.B=e,this.c=n,this.a=r,this.s=a||"BESbswy",this.f={},this.w=i||3e3,this.u=o||null,this.o=this.j=this.h=this.g=null,this.g=new j(this.c,this.s),this.h=new j(this.c,this.s),this.j=new j(this.c,this.s),this.o=new j(this.c,this.s),t=new x(this.a.c+",serif",M(this.a)),t=L(t),this.g.a.style.cssText=t,t=new x(this.a.c+",sans-serif",M(this.a)),t=L(t),this.h.a.style.cssText=t,t=new x("serif",M(this.a)),t=L(t),this.j.a.style.cssText=t,t=new x("sans-serif",M(this.a)),t=L(t),this.o.a.style.cssText=t,P(this.g),P(this.h),P(this.j),P(this.o)}function I(){if(null===ut){var t=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);ut=!!t&&(536>parseInt(t[1],10)||536===parseInt(t[1],10)&&11>=parseInt(t[2],10))}return ut}function q(t,e,n){for(var r in at)if(at.hasOwnProperty(r)&&e===t.f[at[r]]&&n===t.f[at[r]])return!0;return!1}function F(t){var e,n=t.g.a.offsetWidth,r=t.h.a.offsetWidth;(e=n===t.f.serif&&r===t.f["sans-serif"])||(e=I()&&q(t,n,r)),e?it()-t.A>=t.w?I()&&q(t,n,r)&&(null===t.u||t.u.hasOwnProperty(t.a.c))?z(t,t.v):z(t,t.B):B(t):z(t,t.v)}function B(t){setTimeout(i(function(){F(this)},t),50)}function z(t,e){setTimeout(i(function(){s(this.g.a),s(this.h.a),s(this.j.a),s(this.o.a),e(this.a)},t),0)}function H(t,e,n){this.c=t,this.a=e,this.f=0,this.o=this.j=!1,this.s=n}function W(t){0==--t.f&&t.j&&(t.o?(t=t.a,t.g&&l(t.f,[t.a.c("wf","active")],[t.a.c("wf","loading"),t.a.c("wf","inactive")]),N(t,"active")):T(t.a))}function U(t){this.j=t,this.a=new O,this.h=0,this.f=this.g=!0}function $(t,e,n,r,o){var a=0==--t.h;(t.f||t.g)&&setTimeout(function(){var t=o||null,u=r||null||{};if(0===n.length&&a)T(e.a);else{e.f+=n.length,a&&(e.j=a);var s,c=[];for(s=0;s<n.length;s++){var f=n[s],h=u[f.c],p=e.a,d=f;p.g&&l(p.f,[p.a.c("wf",d.c,M(d).toString(),"loading")]),N(p,"fontloading",d),p=null,null===st&&(st=!!window.FontFace&&(!(d=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent))||42<parseInt(d[1],10))),p=st?new D(i(e.g,e),i(e.h,e),e.c,f,e.s,h):new R(i(e.g,e),i(e.h,e),e.c,f,e.s,t,h),c.push(p)}for(s=0;s<c.length;s++)c[s].start()}},0)}function V(t,e,n){var r=[],i=n.timeout;S(e);var r=A(t.a,n,t.c),o=new H(t.c,e,i);for(t.h=r.length,e=0,n=r.length;n>e;e++)r[e].load(function(e,n,r){$(t,o,e,n,r)})}function X(t,e){this.c=t,this.a=e}function Y(t,e,n){var r=f(t.c);return t=(t.a.api||"fast.fonts.net/jsapi").replace(/^.*http(s?):(\/\/)?/,""),r+"//"+t+"/"+e+".js"+(n?"?v="+n:"")}function G(t,e){this.c=t,this.a=e}function Z(t,e,n){t?this.c=t:this.c=e+lt,this.a=[],this.f=[],this.g=n||""}function Q(t,e){for(var n=e.length,r=0;n>r;r++){var i=e[r].split(":");3==i.length&&t.f.push(i.pop());var o="";2==i.length&&""!=i[1]&&(o=":"),t.a.push(i.join(o))}}function K(t){if(0==t.a.length)throw Error("No fonts to load!");if(-1!=t.c.indexOf("kit="))return t.c;for(var e=t.a.length,n=[],r=0;e>r;r++)n.push(t.a[r].replace(/ /g,"+"));return e=t.c+"?family="+n.join("%7C"),0<t.f.length&&(e+="&subset="+t.f.join(",")),0<t.g.length&&(e+="&text="+encodeURIComponent(t.g)),e}function J(t){this.f=t,this.a=[],this.c={}}function tt(t){for(var e=t.f.length,n=0;e>n;n++){var r=t.f[n].split(":"),i=r[0].replace(/\+/g," "),o=["n4"];if(2<=r.length){var a,u=r[1];if(a=[],u)for(var u=u.split(","),s=u.length,l=0;s>l;l++){var c;if(c=u[l],c.match(/^[\w-]+$/)){var f=pt.exec(c.toLowerCase());if(null==f)c="";else{if(c=f[2],c=null==c||""==c?"n":ht[c],f=f[1],null==f||""==f)f="4";else var h=ft[f],f=h?h:isNaN(f)?"4":f.substr(0,1);c=[c,f].join("")}}else c="";c&&a.push(c)}0<a.length&&(o=a),3==r.length&&(r=r[2],a=[],r=r?r.split(","):a,0<r.length&&(r=ct[r[0]])&&(t.c[i]=r))}for(t.c[i]||(r=ct[i])&&(t.c[i]=r),r=0;r<o.length;r+=1)t.a.push(new x(i,o[r]))}}function et(t,e){this.c=t,this.a=e}function nt(t,e){this.c=t,this.a=e}function rt(t,e){this.c=t,this.f=e,this.a=[]}var it=Date.now||function(){return+new Date},ot=!!window.FontFace;b.prototype.c=function(t){for(var e=[],n=0;n<arguments.length;n++)e.push(arguments[n].replace(/[\W_]+/g,"").toLowerCase());return e.join(this.a)},D.prototype.start=function(){var t=this.c.m.document,e=this,n=it(),r=new Promise(function(r,i){function o(){it()-n>=e.f?i():t.fonts.load(w(e.a),e.h).then(function(t){1<=t.length?r():setTimeout(o,25)},function(){i()})}o()}),i=new Promise(function(t,n){setTimeout(n,e.f)});Promise.race([i,r]).then(function(){e.g(e.a)},function(){e.j(e.a)})};var at={D:"serif",C:"sans-serif"},ut=null;R.prototype.start=function(){this.f.serif=this.j.a.offsetWidth,this.f["sans-serif"]=this.o.a.offsetWidth,this.A=it(),F(this)};var st=null;H.prototype.g=function(t){var e=this.a;e.g&&l(e.f,[e.a.c("wf",t.c,M(t).toString(),"active")],[e.a.c("wf",t.c,M(t).toString(),"loading"),e.a.c("wf",t.c,M(t).toString(),"inactive")]),N(e,"fontactive",t),this.o=!0,W(this)},H.prototype.h=function(t){var e=this.a;if(e.g){var n=c(e.f,e.a.c("wf",t.c,M(t).toString(),"active")),r=[],i=[e.a.c("wf",t.c,M(t).toString(),"loading")];n||r.push(e.a.c("wf",t.c,M(t).toString(),"inactive")),l(e.f,r,i)}N(e,"fontinactive",t),W(this)},U.prototype.load=function(t){this.c=new o(this.j,t.context||this.j),this.g=!1!==t.events,this.f=!1!==t.classes,V(this,new C(this.c,t),t)},X.prototype.load=function(t){function e(){if(i["__mti_fntLst"+n]){var r,o=i["__mti_fntLst"+n](),a=[];if(o)for(var u=0;u<o.length;u++){var s=o[u].fontfamily;void 0!=o[u].fontStyle&&void 0!=o[u].fontWeight?(r=o[u].fontStyle+o[u].fontWeight,a.push(new x(s,r))):a.push(new x(s))}t(a)}else setTimeout(function(){e()},50)}var n=this.a.projectId,r=this.a.version;if(n){var i=this.c.m;d(this.c,Y(this,n,r),function(n){n?t([]):e()}).id="__MonotypeAPIScript__"+n}else t([])},G.prototype.load=function(t){var e,n,r=this.a.urls||[],i=this.a.families||[],o=this.a.testStrings||{},a=new g;for(e=0,n=r.length;n>e;e++)p(this.c,r[e],v(a));var u=[];for(e=0,n=i.length;n>e;e++)if(r=i[e].split(":"),r[1])for(var s=r[1].split(","),l=0;l<s.length;l+=1)u.push(new x(r[0],s[l]));else u.push(new x(r[0]));m(a,function(){t(u,o)})};var lt="//fonts.googleapis.com/css",ct={latin:"BESbswy",cyrillic:"йяЖ",greek:"αβΣ",khmer:"កខគ",Hanuman:"កខគ"},ft={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},ht={i:"i",italic:"i",n:"n",normal:"n"},pt=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/,dt={Arimo:!0,Cousine:!0,Tinos:!0};et.prototype.load=function(t){var e=new g,n=this.c,r=new Z(this.a.api,f(n),this.a.text),i=this.a.families;Q(r,i);var o=new J(i);tt(o),p(n,K(r),v(e)),m(e,function(){t(o.a,o.c,dt)})},nt.prototype.load=function(t){var e=this.a.id,n=this.c.m;e?d(this.c,(this.a.api||"https://use.typekit.net")+"/"+e+".js",function(e){if(e)t([]);else if(n.Typekit&&n.Typekit.config&&n.Typekit.config.fn){e=n.Typekit.config.fn;for(var r=[],i=0;i<e.length;i+=2)for(var o=e[i],a=e[i+1],u=0;u<a.length;u++)r.push(new x(o,a[u]));try{n.Typekit.load({events:!1,classes:!1,async:!0})}catch(s){}t(r)}},2e3):t([])},rt.prototype.load=function(t){var e=this.f.id,n=this.c.m,r=this;e?(n.__webfontfontdeckmodule__||(n.__webfontfontdeckmodule__={}),n.__webfontfontdeckmodule__[e]=function(e,n){for(var i=0,o=n.fonts.length;o>i;++i){var a=n.fonts[i];r.a.push(new x(a.name,E("font-weight:"+a.weight+";font-style:"+a.style)))}t(r.a)},d(this.c,f(this.c)+(this.f.api||"//f.fontdeck.com/s/css/js/")+h(this.c)+"/"+e+".js",function(e){e&&t([])})):t([])};var gt=new U(window);gt.a.c.custom=function(t,e){return new G(e,t)},gt.a.c.fontdeck=function(t,e){return new rt(e,t)},gt.a.c.monotype=function(t,e){return new X(e,t)},gt.a.c.typekit=function(t,e){return new nt(e,t)},gt.a.c.google=function(t,e){return new et(e,t)};var vt={load:i(gt.load,gt)};"function"==typeof t&&t.amd?t(function(){return vt}):"undefined"!=typeof n&&n.exports?n.exports=vt:(window.WebFont=vt,window.WebFontConfig&&gt.load(window.WebFontConfig))}()},{}],16:[function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0}),n.WebFont=n.uuid=n.html2canvas=n.d3=n.Baobab=n.$=n._=void 0;var i=t("phantomjs-polyfill"),o=(r(i),t("d3")),a=r(o),u=t("uuid"),s=r(u),l=t("baobab"),c=r(l),f=t("jquery"),h=r(f),p=t("underscore"),d=r(p),g=t("webfontloader"),v=r(g),m=t("html2canvas/dist/html2canvas.min"),y=r(m);n._=d["default"],n.$=h["default"],n.Baobab=c["default"],n.d3=a["default"],n.html2canvas=y["default"],n.uuid=s["default"],n.WebFont=v["default"]},{baobab:1,d3:8,"html2canvas/dist/html2canvas.min":10,jquery:"jquery","phantomjs-polyfill":11,underscore:12,uuid:14,webfontloader:15}]},{},[16])(16)}),function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define("nbpresent-standalone",[],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.nbpresentStandalone=t()}}(function(){return function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.BaseCellManager=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps"),a=t("../logger"),u=t("../parts"),s={};n.BaseCellManager=function(){function t(){r(this,t)}return i(t,[{key:"getCells",value:function(){throw Error("Not Implemented")}},{key:"getPart",value:function(t,e){var n=this.getCells()[t.cell];if(!n&&!e)return null;var r=o.d3.select(e||n.element[0]),i=t.part===u.PART.whole?r:r.select(u.PART_SELECT[t.part]);return i}},{key:"clearThumbnails",value:function(){var t=this,e=arguments.length<=0||void 0===arguments[0]?[]:arguments[0],n=Object.keys(s);e.length&&(n=e.map(function(e){return t.contentKey(e)})),n.map(function(t){delete s[t]})}},{key:"contentKey",value:function(t){return t.cell+"-"+t.part}},{key:"thumbnail",value:function(t){var e=this.getPart(t);return e=e?e.node():null,e?(0,o.html2canvas)(e).then(function(t){return{canvas:t,uri:t.toDataURL("image/png"),width:t.width,height:t.height}},function(e){return a.log.error("thumbnail error",t,e)}):Promise.reject(t)}}]),t}()},{"../logger":6,"../parts":9,"nbpresent-deps":"nbpresent-deps"}],2:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0}),n.StandaloneCellManager=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=t("nbpresent-deps"),s=t("./base");n.StandaloneCellManager=function(t){function e(){return r(this,e),i(this,Object.getPrototypeOf(e).apply(this,arguments))}return o(e,t),a(e,[{key:"getCells",value:function(){var t={};return u.d3.selectAll(".cell").each(function(){var e=u.d3.select(this),n=e.attr("data-nbp-id");n&&(t[n]={element:[e.node()]})}),t}}]),e}(s.BaseCellManager)},{"./base":1,"nbpresent-deps":"nbpresent-deps"}],3:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0}),n.GridLayout=void 0;var a=function(){function t(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(s){i=!0,o=s}finally{try{!r&&u["return"]&&u["return"]()}finally{if(i)throw o}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),u=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),s=function d(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:d(i,e,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0},l=t("nbpresent-deps"),c=t("./manual"),f="grid",h="pad",p=.001;n.GridLayout=function(t){function e(){return r(this,e),i(this,Object.getPrototypeOf(e).apply(this,arguments))}return o(e,t),u(e,[{key:"key",value:function(){return f}},{key:"attrDefaults",value:function(){var t={};return t[h]=.01,t}},{key:"nice",value:function(t,e){var n=a(e,1),r=n[0],i=t._d,o=Math.round(12*i[r]),u=o/12;return Math.abs(u-i[r])>p&&(t[r]=u),t}},{key:"init",value:function(){var t=this;s(Object.getPrototypeOf(e.prototype),"init",this).call(this);var n=l.d3.entries(this.slide.value.regions);n.map(function(e){var n=["slides",t.slide.key,"regions",e.key,"attrs"],r=l._.reduce([["x",0,10],["y",0,10],["width",1,11],["height",1,11]],t.nice,{_d:e.value.attrs},t);delete r._d;var i=!l._.isEmpty(r)&&!l._.isEqual(r,l._.pick(e.value.attrs,"x","y","width","height",h));i&&t.tree.merge(n,r)})}}],[{key:"clsKey",value:function(){return f}}]),e}(c.ManualLayout)},{"./manual":4,"nbpresent-deps":"nbpresent-deps"}],4:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.ManualLayout=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps"),a="manual";n.ManualLayout=function(){function t(e,n,i){r(this,t),this.tree=e,this.slide=n,this.container=i}return i(t,[{key:"regions",value:function(){return o.d3.entries(this.slide.value.regions)}},{key:"key",value:function(){return a}},{key:"attrDefaults",value:function(){return{x:.1,y:.1,width:.8,height:.8}}}],[{key:"clsKey",value:function(){return a}}]),i(t,[{key:"init",value:function(){var t=this.container,e=t.clientWidth,n=t.clientHeight;this.x=o.d3.scale.linear().range([0,e]),this.y=o.d3.scale.linear().range([0,n]),this.initAttrs()}},{key:"initAttrs",value:function(){var t=this,e=this.regions();o.d3.entries(this.attrDefaults()).map(function(n){var r=n.key,i=n.value;e.filter(function(t){return null==t.value.attrs[r]}).map(function(e){var n={};n[r]=i,t.tree.merge(["slides",t.slide.key,"regions",e.key,"attrs"],n)})})}},{key:"update",value:function(t,e){var n=t.value.attrs,r=n.x,i=n.y,o=n.width,a=n.height,u=n.z,s=n.pad;u=u||0,s=s||0,e.style({height:parseInt(this.y(a-2*s))+"px",left:parseInt(this.x(r+s))+"px",top:parseInt(this.y(i+s))+"px",width:parseInt(this.x(o+2*s))+"px"})}},{key:"clean",value:function(t){t.style({left:null,top:null,width:null,height:null})}}]),t}()},{"nbpresent-deps":"nbpresent-deps"}],5:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0}),n.TreemapLayout=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function h(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:h(i,e,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0},s=t("nbpresent-deps"),l=t("./manual"),c="treemap",f="treemap:weight";n.TreemapLayout=function(t){function e(){return r(this,e),i(this,Object.getPrototypeOf(e).apply(this,arguments))}return o(e,t),a(e,[{key:"attrDefaults",value:function(){var t={};return t[f]=1,t}},{key:"key",value:function(){return c}},{key:"init",value:function(){u(Object.getPrototypeOf(e.prototype),"init",this).call(this);var t=this;this.treemap=s.d3.layout.treemap().size([100,100]).sticky(!0).value(function(t){return(t._value||{}).attrs[f]||1});var n=s.d3.entries(this.slide.value.regions).map(function(t){return t._value=t.value,t});this.treemap({children:n}),n.map(function(e){var n=["slides",t.slide.key,"regions",e.key,"attrs"],r=t.tree.get(n),i={x:e.x/100,y:e.y/100,width:e.dx/100,height:e.dy/100},o=void 0;for(var a in i)r[a]!==i[a]&&((o?o:o={})[a]=i[a]);o&&t.tree.merge(n,o)})}}],[{key:"clsKey",value:function(){return c}}]),e}(l.ManualLayout)},{"./manual":4,"nbpresent-deps":"nbpresent-deps"}],6:[function(t,e,n){"use strict";function r(t){s=t}Object.defineProperty(n,"__esModule",{value:!0}),n.setLevel=r;var i=(n.ERROR=0,n.WARN=1),o=n.INFO=2,a=n.LOG=3,u=n.DEBUG=4,s=u;n.log={error:function(){var t;(t=console).error.apply(t,arguments)},warn:function(){var t;s>=i&&(t=console).warn.apply(t,arguments)},info:function(){var t;s>=o&&(t=console).info.apply(t,arguments)},log:function(){var t;s>=a&&(t=console).log.apply(t,arguments)},debug:function(){var t;s>=a&&(t=console).debug.apply(t,arguments)}}},{}],7:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.BaseMode=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("../tree"),a=t("../logger");n.BaseMode=function(){function t(e){r(this,t),this.root=e,this.tree=new o.Tree({slides:this.metadata().slides,themes:this.metadata().themes,root:this.root}).tree,this.slides=this.tree.select(["slides"]),this.themes=this.tree.select(["themes"]),this.log=a.log,this.init()}return i(t,[{key:"init",value:function(){return this}}]),t}()},{"../logger":6,"../tree":16}],8:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0}),n.StandaloneMode=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=function f(t,e,n){null===t&&(t=Function.prototype);var r=Object.getOwnPropertyDescriptor(t,e);if(void 0===r){var i=Object.getPrototypeOf(t);return null===i?void 0:f(i,e,n)}if("value"in r)return r.value;var o=r.get;return void 0!==o?o.call(n):void 0},s=t("nbpresent-deps"),l=t("../presenter/standalone"),c=t("./base");n.StandaloneMode=function(t){function e(){return r(this,e),i(this,Object.getPrototypeOf(e).apply(this,arguments))}return o(e,t),a(e,[{key:"init",value:function(){return u(Object.getPrototypeOf(e.prototype),"init",this).call(this),this.presenter=new l.StandalonePresenter(this.tree),this.presenter.presenting.set(!0),this}},{key:"metadata",value:function(){var t=JSON.parse(s.d3.select("#nbpresent_tree").text());return{slides:t.slides||{},themes:t.themes||{},root:this.root}}}]),e}(c.BaseMode)},{"../presenter/standalone":11,"./base":7,"nbpresent-deps":"nbpresent-deps"}],9:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.partColor=n.PART_SELECT=n.PART=void 0;var r=t("nbpresent-deps"),i={source:"source",outputs:"outputs",widgets:"widgets",whole:"whole"},o={source:".inner_cell",outputs:".output_wrapper",widgets:".widget-area .widget-subarea",whole:null},a=r.d3.scale.ordinal().domain(r.d3.values(i)).range(["blue","red","purple","orange"]);n.PART=i,n.PART_SELECT=o,n.partColor=a},{"nbpresent-deps":"nbpresent-deps"}],10:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.Presenter=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps"),a=t("../speaker/base"),u=t("../theme/base"),s=t("../layout/manual"),l=t("../layout/treemap"),c=t("../layout/grid"),f=t("../parts");n.Presenter=function(){function t(e){var n=this;r(this,t),this.tree=e,this.slides=e.select(["sortedSlides"]),this.cellManager=this.makeCellManager(),this.speaker=this.makeSpeaker(this.tree),this.initUI(),this.themes=this.tree.select(["themes"]),this.presenting=this.tree.select(["app","presenting"]),this.current=this.tree.select(["app","selectedSlide"]),this.presenting.on("update",function(){return n.present()}),[this.slides,this.current,this.themes].map(function(t){var e=t.on;return e("update",function(){return n.update()})})}return i(t,[{key:"makeCellManager",value:function(){throw new Error("Not implemented")}},{key:"makeSpeaker",value:function(t){return new a.SpeakerBase(t)}},{key:"initUI",value:function(){var t=this;this.$ui=o.d3.select("body").append("div").classed({"nbp-presenter":1}),o.d3.select(window).on("mousemove",function(){t.presenting.get()&&t.speaker.hint()}),this.$style=o.d3.select("head").append("style").classed({"nbp-presenter-style":1}),this.$backgrounds=this.$ui.append("div").classed({"nbp-presenter-backgrounds":1})}},{key:"initActions",value:function(){}},{key:"deinitActions",value:function(){}},{key:"layoutClass",value:function(t){return{manual:s.ManualLayout,treemap:l.TreemapLayout,grid:c.GridLayout}[t.value.layout||"manual"]}},{key:"updateLayout",value:function(t){var e=this.layoutClass(t);return this.layout&&this.layout.key()==e.clsKey()&&this.layout.slide.key===t.key?this.layout.slide=t:this.layout=new e(this.tree,t,document.documentElement),this.layout.init(),this}},{key:"themeClass",value:function(t){return u.ThemeBase}},{key:"updateTheme",value:function(t){var e=this.themeClass(t),n=this.themes.get(),r=t.value.theme||n["default"];return n.theme&&!n.theme[r]&&(r=Object.keys(n.theme)[0]),this.theme=new e(this.themes.select(["theme",r||"<default>"]),t,this.$style),this.theme.init(),this}},{key:"present",value:function(){this.presenting.get()?this.initActions():this.deinitActions(),this.update()}},{key:"getCells",value:function(){return this.cellManager.getCells()}},{key:"update",value:function(){var t=this.presenting.get(),e=this;o.d3.select("body").classed({"nbp-presenting":t});var n=this.current.get(),r=this.slides.get([{key:n}]);if(!r)return this.current.set(this.slides.get([0,"key"]));if(this.updateLayout(r).updateTheme(r),!t)return this.clean(!0);var i=this.getCells();o.d3.selectAll(this.allPartSelect()).classed({"nbp-unpresent":1,"nbp-present":0}),o.d3.entries(r.value.regions).filter(function(t){var e=t.value;return e.content}).map(function(t){var n=t.value.content,r=i[n.cell];if(r){var a=o.d3.select(r.element[0]),u=n.part===f.PART.whole?a:a.select(f.PART_SELECT[n.part]);u.classed({"nbp-unpresent":0,"nbp-present":1}).each(function(){return e.theme.update(t,u)}).each(function(){return e.layout.update(t,u)})}}),this.clean()}},{key:"allPartSelect",value:function(){return o.d3.entries(f.PART_SELECT).filter(function(t){var e=t.value;return e}).map(function(t){var e=t.value;return".cell "+e}).concat([".cell"]).join(", ")}},{key:"clean",value:function e(t){var n=this,e=n.layout&&this.layout.clean||function(){return 0};return t&&o.d3.selectAll(this.allPartSelect()).classed({"nbp-unpresent":1,"nbp-present":0}),o.d3.selectAll(".nbp-unpresent").call(e).classed({"nbp-unpresent":0,"nbp-present":0}),this}}]),t}()},{"../layout/grid":3,
"../layout/manual":4,"../layout/treemap":5,"../parts":9,"../speaker/base":12,"../theme/base":13,"nbpresent-deps":"nbpresent-deps"}],11:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(n,"__esModule",{value:!0}),n.StandalonePresenter=void 0;var a=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),u=t("nbpresent-deps"),s=t("../cells/standalone"),l=t("./base"),c={ESC:27,LEFT:37,RIGHT:39,SPACE:32};n.StandalonePresenter=function(t){function e(){return r(this,e),i(this,Object.getPrototypeOf(e).apply(this,arguments))}return o(e,t),a(e,[{key:"makeCellManager",value:function(){return new s.StandaloneCellManager}},{key:"initActions",value:function(){var t=this;u.d3.select("body").on("keydown",function(){switch(u.d3.event.keyCode){case c.RIGHT:case c.SPACE:t.speaker.advance();break;case c.LEFT:t.speaker.retreat();break;case c.ESC:t.present()}})}}]),e}(l.Presenter)},{"../cells/standalone":2,"./base":10,"nbpresent-deps":"nbpresent-deps"}],12:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.SpeakerBase=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps"),a=t("../toolbar");n.SpeakerBase=function(){function t(e){var n=this;r(this,t),this.tree=e,this.current=this.tree.select(["app","selectedSlide"]),this.presenting=this.tree.select(["app","presenting"]),this.presenting.on("update",function(){return n.update()}),this.init().initUI().update()}return i(t,[{key:"init",value:function(){return this}},{key:"initUI",value:function(){var t=this;return this.$ui=o.d3.select("body").append("div").classed({nbpresent_speaker:1}).on("mouseover",function(){return t.focused=!0}).on("mouseout",function(){t.focused=!1,t.startDecay()}),this.initToolbar(),this.startDecay(),this}},{key:"update",value:function(){this.$ui.style({display:this.presenting.get()?null:"none"})}},{key:"decay",value:function(){this.energy=.8*(this.energy||0),this.$ui.style({opacity:this.focused?1:this.energy}),this.focused?(clearInterval(this.decayInterval),this.decayInterval=null):this.energy<=.1&&(clearInterval(this.decayInterval),this.decayInterval=null,this.energy=0)}},{key:"startDecay",value:function(){var t=this;this.energy=.6,this.decayInerval||(this.decayInerval=setInterval(function(){return t.decay()},100))}},{key:"hint",value:function(){this.startDecay()}},{key:"toolbarIcons",value:function(){var t=this,e=this;return[[{icon:"fast-backward",click:function(){return e.current.set(t.tree.get(["sortedSlides",0,"key"]))},label:"First"}],[{icon:"step-backward",click:function(){return t.retreat()},label:"Previous"}],[{icon:"step-forward",click:function(){return t.advance()},label:"Next"}]]}},{key:"retreat",value:function(){var t=this.tree.get(["slides",this.current.get()]);this.current.set(t.prev)}},{key:"advance",value:function(){var t=this,e=this.tree.get(["slides"]),n=e[this.current.get()];return o.d3.entries(e).map(function(e){e.value.prev===n.id&&t.current.set(e.key)}),this.current.get()}},{key:"initToolbar",value:function(){var t=new a.Toolbar;return t.btnGroupClass("btn-group-vertical").btnClass("btn-link btn-lg").tipOptions({container:"body",placement:"top"}),this.$toolbar=this.$ui.append("div").classed({"nbp-presenter-toolbar":1}).datum(this.toolbarIcons()).call(t.update),this}}]),t}()},{"../toolbar":15,"nbpresent-deps":"nbpresent-deps"}],13:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeBase=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps"),a=t("./fonts"),u=".nbp-presenting .nbp-present";n.ThemeBase=function(){function t(e,n,i){r(this,t),this.theme=e,this.rules=e.select(["rules"]),this.palette=e.select(["palette"]),this.backgrounds=e.select(["backgrounds"]),this.textBase=e.select(["text-base"]),this.slide=n,this.$style=i}return i(t,[{key:"update",value:function(t,e){}},{key:"init",value:function(){var t=this.palette.get()||{},e=[{key:"",value:this.textBase.get()||{}}].concat(o.d3.entries(this.rules.get()||{})).map(function(e){var n=e.key,r=e.value,i=o.d3.entries(r).map(function(e){var n=e.key,r=e.value;switch(n){case"font-size":r+="rem";break;case"font-family":(0,a.loadFonts)([r]),r='"'+r+'"';break;case"color":var i=t[r]||{},o=i.rgb,u=void 0===o?[0,0,0]:o,s=i.a,l=void 0===s?1:s;r="rgba("+u+", "+l+")"}return"	"+n+": "+r+";"}),s=o.d3.range(1,7).map(function(t){return"h"+t}).concat(["blockquote"]);return-1!==s.indexOf(n)&&(i.push("margin: 0 0 1.3em 0;"),i.push("padding: 0;")),u+" "+n+"{\n          line-height: 1.25;\n          "+i.join("\n")+"\n        }"}).join("\n");this.$style.text(e);var n=this.backgrounds.get()||{},r=o.d3.select(".nbp-presenter-backgrounds").selectAll(".nbp-presenter-background").data(o.d3.entries(n,function(t){var e=t.key;return e}));r.exit().remove(),r.enter().append("div").classed({"nbp-presenter-background":1}),r.style({"background-image":function(t){var e=t.value,n=e["background-image"];return n&&"url("+n+")"},"background-color":function(e){var n=e.value,r=t[n["background-color"]]||{},i=r.rgb;return i&&"rgb("+i+")"},"background-position":function(t){var e=t.value;return e.x+" "+e.y},left:0,right:0,bottom:0,top:0})}}]),t}()},{"./fonts":14,"nbpresent-deps":"nbpresent-deps"}],14:[function(t,e,n){"use strict";function r(t){return t=i._.difference(t,i._.keys(a)),t.length?(i.WebFont.load({google:{families:t}}),i._.extend(a,i._.object(t,t)),t):[]}Object.defineProperty(n,"__esModule",{value:!0}),n.FONTS=n.FONTS_MONO=n.SYMB=void 0,n.loadFonts=r;var i=t("nbpresent-deps"),o=(n.SYMB="h1 h2 h3 h4 h5 h6 h7\n    ul ol li\n    blockquote pre code\n    strong em a i\n    table thead tbody tfoot th td".split(/\s+/),n.FONTS_MONO=["Inconsolata","Source Code Pro","Roboto Mono","Droid Sans Mono","Ubuntu Mono","VT323","PT Mono","Cousine","Oxygen Mono","Anonymous Pro","Fira Mono","Cutive Mono","Nova Mono","Share Tech Mono"]),a=(n.FONTS=["ABeeZee","Abel","Abril Fatface","Alegreya","Alfa Slab One","Alice","Allerta","Amaranth","Amatic SC","Andika","Arimo","Asap","Average","Bevan","Bitter","Bree Serif","Cabin","Cantata One","Cardo","Clicker Script","Crete Round","Crimson Text","Dancing Script","Didact Gothic","Domine","Dosis","Droid Sans","EB Garamond","Exo","Fanwood Text","Fauna One","Fjalla One","Flamenco","Francois One","Gentium Book Basic","Gudea","Hind","Imprima","Istok Web","Josefin Sans","Josefin Slab","Judson","Kameron","Kreon","Lato","Ledger","Libre Baskerville","Lobster","Lora","Lustria","Medula One","Merriweather","Montserrat","Muli","Neuton","Nixie One","Noto Sans","Nunito","Old Standard TT","Open Sans","Oswald","Ovo","Oxygen","PT Sans","PT Serif","Pacifico","Patua One","Philosopher","Playfair Display","Playfair Display SC","Pontano Sans","Quando","Quattrocento","Quattrocento Sans","Questrial","Quicksand","Raleway","Rancho","Roboto","Roboto Slab","Rokkitt","Rufina","Sacramento","Sansita One","Shadows Into Light","Signika","Sintony","Slabo 13px","Source Sans Pro","Squada One","Stint Ultra Expanded","Ubuntu","Ultra","Unica One","Vollkorn","Walter Turncoat","Yeseva One"].concat(o),{Lato:1,"google:Lato":1});r(["Lato"])},{"nbpresent-deps":"nbpresent-deps"}],15:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.Toolbar=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps"),a=o.d3.functor;n.Toolbar=function(){function t(){r(this,t),this._btnClass=a("btn-default"),this._btnGroupClass=a("btn-group"),this._tipOptions=a({container:"body"}),this.update=this.update.bind(this)}return i(t,[{key:"btnClass",value:function(t){return arguments.length?[this._btnClass=a(t),this][1]:this._btnClass}},{key:"tipOptions",value:function(t){return arguments.length?[this._tipOptions=a(t),this][1]:this._tipOptions}},{key:"btnGroupClass",value:function(t){return arguments.length?[this._btnGroupClass=a(t),this][1]:this._btnGroupClass}},{key:"update",value:function(t){var e=this,n=this;t.classed({"btn-toolbar nbp-toolbar":1});var r=t.selectAll(".btn-toolbar-group").data(function(t){return t});r.enter().append("div").classed({"btn-toolbar-group":1}).classed(this._btnGroupClass(),1);var i=r.selectAll(".btn").data(function(t){return t});i.enter().append("a").classed({btn:1}).call(function(t){t.append("i"),t.append("label")}),i.attr({"class":function(t){return"btn "+e._btnClass(t)},title:function(t){return t.tip||t.label}}).each(function(t){if(o.$.fn.tooltip){try{(0,o.$)(this).tooltip("destroy")}catch(e){}t.tip&&(0,o.$)(this).tooltip(n._tipOptions(t))}}).on("click",function(t){return t.click()}),i.select("i").filter(function(t){var e=t.icon;return o._.isString(e)}).attr({"class":function(t){var e=t.icon;return"fa fa-fw fa-2x fa-"+e}}).selectAll("i").remove();var a=i.select("i").filter(function(t){var e=t.icon;return!o._.isString(e)}).attr({"class":"fa-stack"}).selectAll("i").data(function(t){return t.icon.map(function(){return t})});a.exit().remove(),a.enter().append("i"),a.attr({"class":function(t,e){var n=t.icon;return"fa fa-"+n[e]}}),i.select("label").text(function(t){var e=t.label;return e}),i.filter(function(t){return t.visible&&!t.visible()}).remove(),i.exit().remove(),r.exit().remove()}}]),t}()},{"nbpresent-deps":"nbpresent-deps"}],16:[function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0}),n.Tree=void 0;var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),o=t("nbpresent-deps");n.Tree=function(){function t(e){r(this,t),this.tree=new o.Baobab(o.$.extend({slides:{},sortedSlides:o.Baobab.monkey(["slides"],this.sortedSlides),themes:{}},e))}return i(t,[{key:"sortedSlides",value:function(t){var e=o.d3.entries(t);return e.sort(function(t,e){return null===t.value.prev||t.key===e.value.prev?-1:1}),e}}]),t}()},{"nbpresent-deps":"nbpresent-deps"}]},{},[8])(8)}),require(["jquery","nbpresent-deps","nbpresent-standalone"],function(t,e,n){$(function(){window.nbpresent=new n.StandaloneMode("./")})}),define("main",function(){});
    </script>
  


  <script type="application/json" id="nbpresent_tree">
    {}
  </script></head>
<body>
  <div tabindex="-1" id="notebook" class="border-box-sizing">
    <div class="container" id="notebook-container">

  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Data-Reading-and-Wrangling">Data Reading and Wrangling<a class="anchor-link" href="#Data-Reading-and-Wrangling">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[7]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">pandas</span> <span class="k">as</span> <span class="nn">pd</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">import</span> <span class="nn">matplotlib.pyplot</span> <span class="k">as</span> <span class="nn">plt</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">sklearn</span> <span class="k">import</span> <span class="n">preprocessing</span>

<span class="kn">import</span> <span class="nn">keras.backend</span> <span class="k">as</span> <span class="nn">K</span>
<span class="kn">from</span> <span class="nn">keras.layers.core</span> <span class="k">import</span> <span class="n">Activation</span>
<span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span><span class="p">,</span><span class="n">load_model</span>
<span class="kn">from</span> <span class="nn">keras.layers</span> <span class="k">import</span> <span class="n">Dense</span><span class="p">,</span> <span class="n">Dropout</span><span class="p">,</span> <span class="n">LSTM</span>
<span class="kn">from</span> <span class="nn">keras.callbacks</span> <span class="k">import</span> <span class="n">EarlyStopping</span><span class="p">,</span> <span class="n">ModelCheckpoint</span>
<span class="kn">from</span> <span class="nn">keras.callbacks</span> <span class="k">import</span> <span class="n">TensorBoard</span>



<span class="n">datadir2</span> <span class="o">=</span> <span class="s1">&#39;C:/data_week1/MindTitan/data&#39;</span>
<span class="c1">###############################################################3</span>
<span class="k">def</span> <span class="nf">do_data_processing</span><span class="p">(</span><span class="n">datadir</span><span class="p">):</span>
    <span class="sd">&#39;&#39;&#39;utility functions&#39;&#39;&#39;</span>
    <span class="k">def</span> <span class="nf">output_len</span><span class="p">(</span><span class="n">data</span><span class="p">):</span>
        <span class="k">return</span><span class="p">(</span><span class="n">data</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span>
    
    <span class="k">def</span> <span class="nf">num</span><span class="p">(</span><span class="n">s</span><span class="p">):</span>
        <span class="k">try</span><span class="p">:</span>
            <span class="k">return</span> <span class="nb">int</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
        <span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span>
            <span class="k">return</span> <span class="nb">float</span><span class="p">(</span><span class="n">s</span><span class="p">)</span>
    
   
    <span class="c1">########### READING DATA ####################33</span>
    <span class="n">direct_train</span> <span class="o">=</span> <span class="n">datadir</span> <span class="o">+</span> <span class="s1">&#39;/train.csv&#39;</span>
    <span class="n">direct_test</span> <span class="o">=</span> <span class="n">datadir</span> <span class="o">+</span> <span class="s1">&#39;/test.csv&#39;</span>
    <span class="n">direct_rul</span> <span class="o">=</span> <span class="n">datadir</span> <span class="o">+</span> <span class="s1">&#39;/rul.csv&#39;</span>
    
    <span class="n">rawtrain</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="n">direct_train</span><span class="p">,</span><span class="n">engine</span><span class="o">=</span><span class="s1">&#39;python&#39;</span><span class="p">)</span>
    <span class="n">rawtest</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="n">direct_test</span><span class="p">,</span><span class="n">engine</span><span class="o">=</span><span class="s1">&#39;python&#39;</span><span class="p">)</span>
    <span class="n">test_left_cycles</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="n">direct_rul</span><span class="p">,</span><span class="n">engine</span><span class="o">=</span><span class="s1">&#39;python&#39;</span><span class="p">)</span> <span class="c1"># join this with the test data by dataset_id  and unit_id</span>
    
    <span class="c1">#rawtrain.columns = [x.strip() for x in rawtrain.columns] </span>
    
    <span class="n">rawtest</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="o">.</span><span class="n">strip</span><span class="p">())</span>
    <span class="n">raw_trainlen</span> <span class="o">=</span> <span class="n">output_len</span><span class="p">(</span><span class="n">rawtrain</span><span class="p">)</span>
    <span class="n">raw_testlen</span> <span class="o">=</span> <span class="n">output_len</span><span class="p">(</span><span class="n">rawtest</span><span class="p">)</span>
    <span class="n">train</span> <span class="o">=</span> <span class="n">rawtrain</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
    <span class="n">test</span> <span class="o">=</span> <span class="n">rawtest</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
    <span class="n">together</span> <span class="o">=</span> <span class="p">[</span><span class="n">rawtrain</span><span class="p">,</span><span class="n">rawtest</span><span class="p">]</span>
    <span class="n">rawfull</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">together</span><span class="p">)</span>
    <span class="n">raw_full_len</span> <span class="o">=</span> <span class="n">output_len</span><span class="p">(</span><span class="n">rawfull</span><span class="p">)</span>
    
    <span class="n">trainlengths</span> <span class="o">=</span> <span class="p">[</span><span class="nb">sum</span><span class="p">(</span><span class="n">train</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span><span class="o">==</span><span class="s1">&#39;FD00&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="p">))</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">)]</span>
    <span class="nb">sum</span><span class="p">(</span><span class="n">trainlengths</span><span class="p">)</span> <span class="o">==</span> <span class="n">raw_trainlen</span>
    <span class="n">testlengths</span> <span class="o">=</span> <span class="p">[</span><span class="nb">sum</span><span class="p">(</span><span class="n">test</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span><span class="o">==</span><span class="s1">&#39;FD00&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">i</span><span class="p">))</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">)]</span>
    <span class="nb">sum</span><span class="p">(</span><span class="n">testlengths</span><span class="p">)</span> <span class="o">==</span> <span class="n">raw_testlen</span>
    
    <span class="sd">&#39;&#39;&#39; MERGING TEST DATA &#39;&#39;&#39;</span>
    <span class="nb">set</span><span class="p">(</span><span class="n">test</span><span class="o">.</span><span class="n">unit_id</span><span class="p">)</span> <span class="o">==</span> <span class="nb">set</span><span class="p">(</span><span class="n">test_left_cycles</span><span class="o">.</span><span class="n">unit_id</span><span class="p">)</span> <span class="c1"># checking if the amount of unique engines is the same, so that inner join is meaningful</span>
    <span class="n">test_merged</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">merge</span><span class="p">(</span><span class="n">test</span><span class="p">,</span> <span class="n">test_left_cycles</span><span class="p">,</span> <span class="n">how</span><span class="o">=</span><span class="s1">&#39;left&#39;</span><span class="p">,</span> <span class="n">on</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">,</span><span class="s1">&#39;unit_id&#39;</span><span class="p">],</span> <span class="n">sort</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span> <span class="c1"># OK</span>
    
    <span class="n">together</span> <span class="o">=</span> <span class="p">[</span><span class="n">train</span><span class="p">,</span><span class="n">test_merged</span><span class="p">]</span>
    <span class="n">fulldata1</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">together</span><span class="p">)</span>
    
    <span class="sd">&#39;&#39;&#39; Relabelling dataset id and reordering columns&#39;&#39;&#39;</span>
    
    <span class="n">fulldata1</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">str</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s1">&#39;FD00&#39;</span><span class="p">,</span> <span class="s1">&#39;&#39;</span><span class="p">)</span>
    <span class="n">fulldata1</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">apply</span><span class="p">(</span><span class="n">num</span><span class="p">)</span>
    <span class="n">fulldata1</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">columns</span><span class="o">=</span><span class="p">{</span><span class="s1">&#39;unit_id&#39;</span><span class="p">:</span><span class="s1">&#39;id&#39;</span><span class="p">})</span>
    <span class="n">fulldata_cols</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="o">.</span><span class="n">columns</span><span class="o">.</span><span class="n">tolist</span><span class="p">()</span>
    <span class="n">fulldata_cols</span> <span class="o">=</span> <span class="n">fulldata_cols</span><span class="p">[</span><span class="o">-</span><span class="mi">1</span><span class="p">:]</span> <span class="o">+</span> <span class="n">fulldata_cols</span><span class="p">[:</span><span class="o">-</span><span class="mi">1</span><span class="p">]</span>
    <span class="n">fulldata1</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="p">[</span><span class="n">fulldata_cols</span><span class="p">]</span>
    <span class="sd">&#39;&#39;&#39; Before we do anything else, we need to recode the engine ids since we have 4 datasets with different engines&#39;&#39;&#39;</span>
    <span class="sd">&#39;&#39;&#39; Coding the engines to be unique -- since the engines in the test and train are recoded </span>
<span class="sd">    in the same fashion, one should be allowed to use engine id as a predictor&#39;&#39;&#39;</span>
    
    <span class="k">def</span> <span class="nf">recode_engines</span><span class="p">(</span><span class="n">fulldata1</span><span class="p">):</span> 
        <span class="n">traininfo</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="n">testinfo</span> <span class="o">=</span> <span class="p">{}</span>
        <span class="n">train_</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="p">[:</span><span class="n">raw_trainlen</span><span class="p">]</span>
        <span class="n">test_</span> <span class="o">=</span> <span class="n">fulldata1</span><span class="p">[</span><span class="n">raw_trainlen</span><span class="p">:]</span>
    
        <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">):</span>
            <span class="n">indicatorvar</span> <span class="o">=</span> <span class="n">train_</span><span class="o">.</span><span class="n">dataset_id</span> <span class="o">==</span> <span class="n">i</span>
            <span class="n">train</span> <span class="o">=</span> <span class="n">train_</span><span class="p">[</span><span class="n">indicatorvar</span><span class="p">]</span>
        
            <span class="n">indicatorvar2</span> <span class="o">=</span> <span class="n">test_</span><span class="o">.</span><span class="n">dataset_id</span> <span class="o">==</span> <span class="n">i</span>
            <span class="n">test</span> <span class="o">=</span> <span class="n">test_</span><span class="p">[</span><span class="n">indicatorvar2</span><span class="p">]</span>
            <span class="k">if</span> <span class="n">i</span> <span class="o">&gt;</span> <span class="mi">1</span><span class="p">:</span>
                <span class="n">train</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">=</span><span class="n">train</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span> <span class="o">+</span> <span class="nb">max</span><span class="p">(</span><span class="n">traininfo</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="s1">&#39;id&#39;</span><span class="p">])</span> <span class="c1"># take the maximum engine number</span>
                <span class="n">test</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">=</span><span class="n">test</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span> <span class="o">+</span> <span class="nb">max</span><span class="p">(</span><span class="n">traininfo</span><span class="p">[</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">][</span><span class="s1">&#39;id&#39;</span><span class="p">])</span>
            <span class="n">traininfo</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">train</span>
            <span class="n">testinfo</span><span class="p">[</span><span class="n">i</span><span class="p">]</span> <span class="o">=</span> <span class="n">test</span>
            
            <span class="k">if</span> <span class="n">i</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
                <span class="n">train_full</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">traininfo</span><span class="o">.</span><span class="n">values</span><span class="p">())</span>
                <span class="n">test_full</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">testinfo</span><span class="o">.</span><span class="n">values</span><span class="p">())</span>
        <span class="c1">#if output_len(train_full)==output_len(train):</span>
        <span class="k">return</span><span class="p">([</span><span class="n">train_full</span><span class="p">,</span><span class="n">test_full</span><span class="p">])</span>
    <span class="c1">#    else:</span>
    <span class="c1">#        return(&#39;some data missing&#39;)</span>
            
    <span class="n">train_full</span><span class="p">,</span><span class="n">test_full</span> <span class="o">=</span> <span class="n">recode_engines</span><span class="p">(</span><span class="n">fulldata1</span><span class="p">)</span>
    <span class="n">output_len</span><span class="p">(</span><span class="n">train_full</span><span class="p">)</span><span class="o">+</span><span class="n">output_len</span><span class="p">(</span><span class="n">test_full</span><span class="p">)</span> <span class="o">==</span> <span class="n">output_len</span><span class="p">(</span><span class="n">fulldata1</span><span class="p">)</span> <span class="c1"># check ok</span>
    
    <span class="nb">sum</span><span class="p">(</span><span class="n">train_full</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">())</span> <span class="o">==</span> <span class="mi">0</span> <span class="c1"># we see that there are missing values. We know it&#39;s rul of train data</span>
    <span class="nb">sum</span><span class="p">(</span><span class="n">test_full</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">())</span> <span class="o">==</span> <span class="mi">0</span>  <span class="c1"># true</span>
    
    <span class="n">train_full</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">()</span> <span class="c1"># 160359 missing values standing for train data rul. Next we generate this feature</span>
    <span class="n">test_full</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">()</span>
    
    <span class="sd">&#39;&#39;&#39; In this step we create the remaining useful life variable for the train data&#39;&#39;&#39;</span>
    <span class="n">rul_frame</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">train_full</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">)[</span><span class="s1">&#39;cycle&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">max</span><span class="p">())</span><span class="o">.</span><span class="n">reset_index</span><span class="p">()</span>
    <span class="n">rul_frame</span><span class="o">.</span><span class="n">columns</span> <span class="o">=</span> <span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">,</span> <span class="s1">&#39;max&#39;</span><span class="p">]</span>
    <span class="n">train_full</span> <span class="o">=</span> <span class="n">train_full</span><span class="o">.</span><span class="n">merge</span><span class="p">(</span><span class="n">rul_frame</span><span class="p">,</span> <span class="n">on</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">],</span> <span class="n">how</span><span class="o">=</span><span class="s1">&#39;left&#39;</span><span class="p">)</span>
    <span class="n">train_full</span><span class="p">[</span><span class="s1">&#39;rul&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">train_full</span><span class="p">[</span><span class="s1">&#39;max&#39;</span><span class="p">]</span> <span class="o">-</span> <span class="n">train_full</span><span class="p">[</span><span class="s1">&#39;cycle&#39;</span><span class="p">]</span>
    <span class="n">train_full</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="s1">&#39;max&#39;</span><span class="p">,</span> <span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">inplace</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
    
    <span class="n">np</span><span class="o">.</span><span class="n">mean</span><span class="p">((</span><span class="n">train_full</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">min</span><span class="p">())</span> <span class="c1"># ok average of the min rul&#39;s per engine is 0</span>
    <span class="n">np</span><span class="o">.</span><span class="n">mean</span><span class="p">((</span><span class="n">test_full</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">))</span><span class="o">.</span><span class="n">min</span><span class="p">())</span> <span class="c1"># in the test data, the average of min rul&#39;s per engine is 81.4</span>
    
    <span class="sd">&#39;&#39;&#39;Checking that the train and test data lengths add up to full data&#39;&#39;&#39;</span>
    <span class="n">output_len</span><span class="p">(</span><span class="n">train_full</span><span class="p">)</span> <span class="o">+</span> <span class="n">output_len</span><span class="p">(</span><span class="n">test_full</span><span class="p">)</span> <span class="o">==</span> <span class="n">raw_full_len</span> <span class="c1"># ok</span>
    
    <span class="sd">&#39;&#39;&#39; Now are from hence: ID REFERS TO UNIT ID (ENGINE ID)&#39;&#39;&#39;</span>
    
    <span class="n">full_lengths</span><span class="o">=</span> <span class="p">[</span><span class="nb">sum</span><span class="p">(</span><span class="n">fulldata1</span><span class="p">[</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">]</span><span class="o">==</span><span class="n">i</span><span class="p">)</span> <span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">)]</span>
    <span class="nb">sum</span><span class="p">(</span><span class="n">full_lengths</span><span class="p">)</span> <span class="o">==</span> <span class="n">raw_full_len</span>  <span class="c1"># data size OK</span>
    
    <span class="sd">&#39;&#39;&#39; check if any missing values in the data, should be 0 now&#39;&#39;&#39;</span>
    <span class="nb">sum</span><span class="p">(</span><span class="n">train_full</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">())</span> <span class="o">==</span> <span class="mi">0</span> <span class="c1"># we see that there are missing values. We know it&#39;s rul of train data</span>
    <span class="nb">sum</span><span class="p">(</span><span class="n">test_full</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">())</span> <span class="o">==</span> <span class="mi">0</span> <span class="c1"># ok</span>
    <span class="sd">&#39;&#39;&#39; </span>
<span class="sd">    160359 ELEMENTS TRAIN  </span>
<span class="sd">    104897 ELEMENTS TEST, </span>
<span class="sd">    265256 ELEMENTS TOTAL &#39;&#39;&#39;</span>
    <span class="c1">############## TRAINING DATA MOD ################</span>
    <span class="n">trainlen</span> <span class="o">=</span> <span class="n">output_len</span><span class="p">(</span><span class="n">train_full</span><span class="p">)</span>
    <span class="n">testlen</span> <span class="o">=</span> <span class="n">output_len</span><span class="p">(</span><span class="n">test_full</span><span class="p">)</span>
    <span class="n">trainlen</span>
    <span class="n">testlen</span>
    
    <span class="c1">################################################################################3</span>
    
    <span class="n">frames</span> <span class="o">=</span> <span class="p">[</span><span class="n">train_full</span><span class="p">,</span><span class="n">test_full</span><span class="p">]</span>
    <span class="sd">&#39;&#39;&#39;combining train and test now should result in 0 NaNs since both have the rul variable&#39;&#39;&#39;</span>
    <span class="n">fulldata</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">concat</span><span class="p">(</span><span class="n">frames</span><span class="p">)</span> 
    
    <span class="n">fulldata</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">()</span> <span class="c1"># &#39;Fine, fulldata has 0 Na</span>
    
    <span class="nb">print</span><span class="p">(</span><span class="n">fulldata</span><span class="o">.</span><span class="n">head</span><span class="p">())</span>
    <span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1"> Data Types:&#39;</span><span class="p">)</span>
    <span class="nb">print</span><span class="p">(</span><span class="n">fulldata</span><span class="o">.</span><span class="n">dtypes</span><span class="p">)</span>
    
    <span class="s1">&#39; We see that sensors 17 and 18 are of integer type &#39;</span>
    
    <span class="c1">################################################## DATA NORMALIZATION ###################################3</span>
    
    <span class="sd">&#39;&#39;&#39;DATA NORMALIZATION -- we don&#39;t use test data when normalizing training data&#39;&#39;&#39;</span>
    <span class="sd">&#39;&#39;&#39;train_full.columns returns the index object with feature names for the training set&#39;&#39;&#39;</span>
    
    <span class="n">feats_to_normalize</span> <span class="o">=</span> <span class="n">train_full</span><span class="o">.</span><span class="n">columns</span><span class="o">.</span><span class="n">difference</span><span class="p">([</span><span class="s1">&#39;id&#39;</span><span class="p">,</span><span class="s1">&#39;cycle&#39;</span><span class="p">,</span><span class="s1">&#39;rul&#39;</span><span class="p">,</span><span class="s1">&#39;dataset_id&#39;</span><span class="p">])</span> 
    <span class="sd">&#39;&#39;&#39; exclude engine ID and remaining useful life columns from normalization because engine ID is just an identifier</span>
<span class="sd">    and remaining useful life should not be normalized to the max of the engines since each engine is different ?&#39;&#39;&#39;</span>
    
    <span class="s1">&#39;Only sensor and setting columns are normalized&#39;</span>
    
    <span class="k">def</span> <span class="nf">normalize_data</span><span class="p">(</span><span class="n">data</span><span class="p">,</span><span class="n">feats_to_normalize</span><span class="p">):</span>
        <span class="n">minmax_scaler</span> <span class="o">=</span> <span class="n">preprocessing</span><span class="o">.</span><span class="n">MinMaxScaler</span><span class="p">()</span>
        <span class="n">normalized_data</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">DataFrame</span><span class="p">(</span><span class="n">minmax_scaler</span><span class="o">.</span><span class="n">fit_transform</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">feats_to_normalize</span><span class="p">]),</span> <span class="n">columns</span><span class="o">=</span><span class="n">feats_to_normalize</span><span class="p">,</span> <span class="n">index</span><span class="o">=</span><span class="n">data</span><span class="o">.</span><span class="n">index</span><span class="p">)</span>
        <span class="k">return</span><span class="p">(</span><span class="n">normalized_data</span><span class="p">)</span>
    
    <span class="k">def</span> <span class="nf">merge_data</span><span class="p">(</span><span class="n">full</span><span class="p">,</span><span class="n">feats_to_normalize</span><span class="p">):</span>
        <span class="n">normalized_train</span> <span class="o">=</span> <span class="n">normalize_data</span><span class="p">(</span><span class="n">full</span><span class="p">,</span><span class="n">feats_to_normalize</span><span class="p">)</span>
        <span class="n">normalized_train</span><span class="o">.</span><span class="n">isnull</span><span class="p">()</span><span class="o">.</span><span class="n">sum</span><span class="p">()</span> <span class="c1"># &#39;Fine, normalized_train has 0 Na</span>
        <span class="n">unnormalized_features</span> <span class="o">=</span> <span class="n">full</span><span class="o">.</span><span class="n">columns</span><span class="o">.</span><span class="n">difference</span><span class="p">(</span><span class="n">feats_to_normalize</span><span class="p">)</span>
        <span class="n">combined</span> <span class="o">=</span> <span class="n">full</span><span class="p">[</span><span class="n">unnormalized_features</span><span class="p">]</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">normalized_train</span><span class="p">)</span>
        <span class="k">if</span> <span class="s1">&#39;cycle_norm&#39;</span> <span class="ow">in</span> <span class="n">full</span><span class="o">.</span><span class="n">columns</span><span class="p">:</span>
            <span class="n">combined</span><span class="o">.</span><span class="n">drop</span><span class="p">(</span><span class="s1">&#39;cycle_norm&#39;</span><span class="p">,</span><span class="n">axis</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
        <span class="n">combined</span> <span class="o">=</span> <span class="n">combined</span><span class="o">.</span><span class="n">reindex</span><span class="p">(</span><span class="n">columns</span> <span class="o">=</span> <span class="n">full</span><span class="o">.</span><span class="n">columns</span><span class="p">)</span>
        <span class="k">return</span><span class="p">(</span><span class="n">combined</span><span class="p">)</span>
        
    <span class="n">processed_train</span> <span class="o">=</span> <span class="n">merge_data</span><span class="p">(</span><span class="n">train_full</span><span class="p">,</span><span class="n">feats_to_normalize</span><span class="p">)</span>
    <span class="n">processed_test</span> <span class="o">=</span> <span class="n">merge_data</span><span class="p">(</span><span class="n">test_full</span><span class="p">,</span><span class="n">feats_to_normalize</span><span class="p">)</span>
    <span class="n">output_len</span><span class="p">(</span><span class="n">processed_train</span><span class="p">)</span> <span class="o">+</span> <span class="n">output_len</span><span class="p">(</span><span class="n">processed_test</span><span class="p">)</span> <span class="o">==</span> <span class="n">output_len</span><span class="p">(</span><span class="n">fulldata1</span><span class="p">)</span> <span class="c1"># check ok</span>
    <span class="k">return</span><span class="p">(</span><span class="n">processed_train</span><span class="p">,</span><span class="n">processed_test</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[8]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">processed_train</span><span class="p">,</span><span class="n">processed_test</span> <span class="o">=</span> <span class="n">do_data_processing</span><span class="p">(</span><span class="n">datadir2</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt"></div>
<div class="output_subarea output_stream output_stderr output_text">
<pre>C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\ipykernel\__main__.py:88: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\ipykernel\__main__.py:89: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
</pre>
</div>
</div>

<div class="output_area"><div class="prompt"></div>
<div class="output_subarea output_stream output_stdout output_text">
<pre>   id  cycle  dataset_id    rul  sensor 1  sensor 10  sensor 11  sensor 12  \
0   1      1           1  191.0    518.67        1.3      47.47     521.66   
1   1      2           1  190.0    518.67        1.3      47.49     522.28   
2   1      3           1  189.0    518.67        1.3      47.27     522.42   
3   1      4           1  188.0    518.67        1.3      47.13     522.86   
4   1      5           1  187.0    518.67        1.3      47.28     522.19   

   sensor 13  sensor 14    ...      sensor 3  sensor 4  sensor 5  sensor 6  \
0    2388.02    8138.62    ...       1589.70   1400.60     14.62     21.61   
1    2388.07    8131.49    ...       1591.82   1403.14     14.62     21.61   
2    2388.03    8133.23    ...       1587.99   1404.20     14.62     21.61   
3    2388.08    8133.83    ...       1582.79   1401.87     14.62     21.61   
4    2388.04    8133.80    ...       1582.85   1406.22     14.62     21.61   

   sensor 7  sensor 8  sensor 9  setting 1  setting 2  setting 3  
0    554.36   2388.06   9046.19    -0.0007    -0.0004      100.0  
1    553.75   2388.04   9044.07     0.0019    -0.0003      100.0  
2    554.26   2388.08   9052.94    -0.0043     0.0003      100.0  
3    554.45   2388.11   9049.48     0.0007     0.0000      100.0  
4    554.00   2388.06   9055.15    -0.0019    -0.0002      100.0  

[5 rows x 28 columns]

 Data Types:
id              int64
cycle           int64
dataset_id      int64
rul           float64
sensor 1      float64
sensor 10     float64
sensor 11     float64
sensor 12     float64
sensor 13     float64
sensor 14     float64
sensor 15     float64
sensor 16     float64
sensor 17       int64
sensor 18       int64
sensor 19     float64
sensor 2      float64
sensor 20     float64
sensor 21     float64
sensor 3      float64
sensor 4      float64
sensor 5      float64
sensor 6      float64
sensor 7      float64
sensor 8      float64
sensor 9      float64
setting 1     float64
setting 2     float64
setting 3     float64
dtype: object
</pre>
</div>
</div>

</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Data-Exploration">Data Exploration<a class="anchor-link" href="#Data-Exploration">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[12]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">processed_train</span><span class="o">.</span><span class="n">head</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt output_prompt">Out[12]:</div>

<div class="output_html rendered_html output_subarea output_execute_result">
<div>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>id</th>
      <th>cycle</th>
      <th>dataset_id</th>
      <th>rul</th>
      <th>sensor 1</th>
      <th>sensor 10</th>
      <th>sensor 11</th>
      <th>sensor 12</th>
      <th>sensor 13</th>
      <th>sensor 14</th>
      <th>...</th>
      <th>sensor 3</th>
      <th>sensor 4</th>
      <th>sensor 5</th>
      <th>sensor 6</th>
      <th>sensor 7</th>
      <th>sensor 8</th>
      <th>sensor 9</th>
      <th>setting 1</th>
      <th>setting 2</th>
      <th>setting 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>0</th>
      <td>1</td>
      <td>1</td>
      <td>1</td>
      <td>191</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.915132</td>
      <td>0.961313</td>
      <td>0.993194</td>
      <td>0.653748</td>
      <td>...</td>
      <td>0.927293</td>
      <td>0.902111</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.962153</td>
      <td>0.998776</td>
      <td>0.842550</td>
      <td>0.000190</td>
      <td>0.000237</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>1</th>
      <td>1</td>
      <td>2</td>
      <td>1</td>
      <td>190</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.916733</td>
      <td>0.962828</td>
      <td>0.993332</td>
      <td>0.637831</td>
      <td>...</td>
      <td>0.932957</td>
      <td>0.908192</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.960749</td>
      <td>0.998734</td>
      <td>0.840867</td>
      <td>0.000252</td>
      <td>0.000356</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>2</th>
      <td>1</td>
      <td>3</td>
      <td>1</td>
      <td>189</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.899119</td>
      <td>0.963170</td>
      <td>0.993222</td>
      <td>0.641715</td>
      <td>...</td>
      <td>0.922723</td>
      <td>0.910730</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.961923</td>
      <td>0.998818</td>
      <td>0.847906</td>
      <td>0.000105</td>
      <td>0.001068</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>3</th>
      <td>1</td>
      <td>4</td>
      <td>1</td>
      <td>188</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.887910</td>
      <td>0.964246</td>
      <td>0.993359</td>
      <td>0.643055</td>
      <td>...</td>
      <td>0.908829</td>
      <td>0.905152</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.962360</td>
      <td>0.998882</td>
      <td>0.845161</td>
      <td>0.000224</td>
      <td>0.000712</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>4</th>
      <td>1</td>
      <td>5</td>
      <td>1</td>
      <td>187</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.899920</td>
      <td>0.962608</td>
      <td>0.993249</td>
      <td>0.642988</td>
      <td>...</td>
      <td>0.908989</td>
      <td>0.915565</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.961324</td>
      <td>0.998776</td>
      <td>0.849660</td>
      <td>0.000162</td>
      <td>0.000475</td>
      <td>1.0</td>
    </tr>
  </tbody>
</table>
<p>5 rows × 28 columns</p>
</div>
</div>

</div>

</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[10]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">processed_test</span><span class="o">.</span><span class="n">head</span><span class="p">()</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt output_prompt">Out[10]:</div>

<div class="output_html rendered_html output_subarea output_execute_result">
<div>
<table border="1" class="dataframe">
  <thead>
    <tr style="text-align: right;">
      <th></th>
      <th>id</th>
      <th>cycle</th>
      <th>dataset_id</th>
      <th>rul</th>
      <th>sensor 1</th>
      <th>sensor 10</th>
      <th>sensor 11</th>
      <th>sensor 12</th>
      <th>sensor 13</th>
      <th>sensor 14</th>
      <th>...</th>
      <th>sensor 3</th>
      <th>sensor 4</th>
      <th>sensor 5</th>
      <th>sensor 6</th>
      <th>sensor 7</th>
      <th>sensor 8</th>
      <th>sensor 9</th>
      <th>setting 1</th>
      <th>setting 2</th>
      <th>setting 3</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>57810</th>
      <td>1</td>
      <td>1</td>
      <td>1</td>
      <td>112.0</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.911837</td>
      <td>0.963560</td>
      <td>0.994672</td>
      <td>0.701119</td>
      <td>...</td>
      <td>0.933831</td>
      <td>0.912248</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.964743</td>
      <td>0.998923</td>
      <td>0.891455</td>
      <td>0.000262</td>
      <td>0.001068</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>57811</th>
      <td>1</td>
      <td>2</td>
      <td>1</td>
      <td>112.0</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.936327</td>
      <td>0.964637</td>
      <td>0.994755</td>
      <td>0.736893</td>
      <td>...</td>
      <td>0.942400</td>
      <td>0.905430</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.966937</td>
      <td>0.998860</td>
      <td>0.895018</td>
      <td>0.000143</td>
      <td>0.000356</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>57812</th>
      <td>1</td>
      <td>3</td>
      <td>1</td>
      <td>112.0</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.936327</td>
      <td>0.964172</td>
      <td>0.994672</td>
      <td>0.712688</td>
      <td>...</td>
      <td>0.938305</td>
      <td>0.919896</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.965228</td>
      <td>0.998944</td>
      <td>0.897148</td>
      <td>0.000214</td>
      <td>0.000831</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>57813</th>
      <td>1</td>
      <td>4</td>
      <td>1</td>
      <td>112.0</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.918367</td>
      <td>0.962727</td>
      <td>0.994727</td>
      <td>0.719807</td>
      <td>...</td>
      <td>0.930658</td>
      <td>0.932310</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.965136</td>
      <td>0.998902</td>
      <td>0.887363</td>
      <td>0.000307</td>
      <td>0.000712</td>
      <td>1.0</td>
    </tr>
    <tr>
      <th>57814</th>
      <td>1</td>
      <td>5</td>
      <td>1</td>
      <td>112.0</td>
      <td>1.0</td>
      <td>0.948718</td>
      <td>0.920816</td>
      <td>0.964613</td>
      <td>0.994672</td>
      <td>0.711264</td>
      <td>...</td>
      <td>0.938983</td>
      <td>0.921314</td>
      <td>1.0</td>
      <td>1.0</td>
      <td>0.965344</td>
      <td>0.998860</td>
      <td>0.886742</td>
      <td>0.000240</td>
      <td>0.000712</td>
      <td>1.0</td>
    </tr>
  </tbody>
</table>
<p>5 rows × 28 columns</p>
</div>
</div>

</div>

</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Plot-Test-Data-Correlation-Matrix">Plot Test Data Correlation Matrix<a class="anchor-link" href="#Plot-Test-Data-Correlation-Matrix">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[22]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">size</span> <span class="o">=</span> <span class="mi">25</span>
<span class="n">rawtest</span> <span class="o">=</span> <span class="n">pd</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">&#39;./data/test.csv&#39;</span><span class="p">,</span><span class="n">engine</span><span class="o">=</span><span class="s1">&#39;python&#39;</span><span class="p">)</span>
<span class="n">rawtest_timeseries</span> <span class="o">=</span>  <span class="n">rawtest</span><span class="o">.</span><span class="n">iloc</span><span class="p">[:,</span> <span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="mi">11</span><span class="p">,</span><span class="mi">12</span><span class="p">,</span><span class="mi">13</span><span class="p">,</span><span class="mi">14</span><span class="p">,</span><span class="mi">15</span><span class="p">,</span><span class="mi">16</span><span class="p">,</span><span class="mi">17</span><span class="p">,</span><span class="mi">18</span><span class="p">,</span><span class="mi">19</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">21</span><span class="p">,</span><span class="mi">22</span><span class="p">,</span><span class="mi">23</span><span class="p">,</span><span class="mi">24</span><span class="p">,</span><span class="mi">25</span><span class="p">,</span><span class="mi">26</span><span class="p">,</span><span class="mi">27</span><span class="p">,</span><span class="mi">28</span><span class="p">]]</span> <span class="c1"># index buggy?</span>
<span class="n">grouped</span> <span class="o">=</span> <span class="n">rawtest_timeseries</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">)</span>

<span class="n">corrmatrix</span> <span class="o">=</span> <span class="n">rawtest_timeseries</span><span class="o">.</span><span class="n">corr</span><span class="p">()</span>
<span class="n">fig</span><span class="p">,</span> <span class="n">ax</span> <span class="o">=</span> <span class="n">plt</span><span class="o">.</span><span class="n">subplots</span><span class="p">(</span><span class="n">figsize</span><span class="o">=</span><span class="p">(</span><span class="n">size</span><span class="p">,</span> <span class="n">size</span><span class="p">))</span>
<span class="n">ax</span><span class="o">.</span><span class="n">matshow</span><span class="p">(</span><span class="n">corrmatrix</span><span class="p">)</span>
<span class="n">plt</span><span class="o">.</span><span class="n">xticks</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">corrmatrix</span><span class="o">.</span><span class="n">columns</span><span class="p">)),</span> <span class="n">corrmatrix</span><span class="o">.</span><span class="n">columns</span><span class="p">);</span>
<span class="n">plt</span><span class="o">.</span><span class="n">yticks</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="nb">len</span><span class="p">(</span><span class="n">corrmatrix</span><span class="o">.</span><span class="n">columns</span><span class="p">)),</span> <span class="n">corrmatrix</span><span class="o">.</span><span class="n">columns</span><span class="p">);</span>
<span class="n">fig</span><span class="o">.</span><span class="n">savefig</span><span class="p">(</span><span class="s2">&quot;./timeseries_correlationmatrix.png&quot;</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Time-Series-Features-Preparation">Time Series Features Preparation<a class="anchor-link" href="#Time-Series-Features-Preparation">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[31]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>
<span class="kn">from</span> <span class="nn">sklearn</span> <span class="k">import</span> <span class="n">cross_validation</span> <span class="k">as</span> <span class="n">cv</span>

<span class="n">min_max_cycle_test</span><span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">min</span><span class="p">(</span><span class="n">processed_test</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">)[</span><span class="s1">&#39;cycle&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">max</span><span class="p">())</span> 

<span class="n">min_max_cycle_test</span><span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">min</span><span class="p">(</span><span class="n">processed_test</span><span class="o">.</span><span class="n">groupby</span><span class="p">(</span><span class="s1">&#39;id&#39;</span><span class="p">)[</span><span class="s1">&#39;cycle&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">max</span><span class="p">())</span> <span class="c1"># NB! Smallest window in the testing set is 19, so cannot use longer windows than 18</span>


<span class="n">test_feature_names</span>  <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">filter</span><span class="p">(</span><span class="k">lambda</span> <span class="n">s</span><span class="p">:</span> <span class="p">(</span><span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;dataset&#39;</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;lessthan&#39;</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;rul&#39;</span><span class="p">)),</span> <span class="n">processed_test</span><span class="o">.</span><span class="n">columns</span><span class="p">))</span>

<span class="k">def</span> <span class="nf">prepare_features</span><span class="p">(</span><span class="n">data</span><span class="p">,</span><span class="n">windowlength</span><span class="p">,</span><span class="n">features</span><span class="p">,</span> <span class="n">iftest</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">generate_features</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">windowlength</span><span class="p">,</span> <span class="n">features</span><span class="p">):</span>
        <span class="n">data_array</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">features</span><span class="p">]</span><span class="o">.</span><span class="n">values</span>
        <span class="n">data_len</span> <span class="o">=</span> <span class="n">data_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
        <span class="k">for</span> <span class="n">start</span><span class="p">,</span> <span class="n">end</span> <span class="ow">in</span> <span class="nb">zip</span><span class="p">(</span><span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="n">data_len</span><span class="o">-</span><span class="n">windowlength</span><span class="p">),</span> <span class="nb">range</span><span class="p">(</span><span class="n">windowlength</span><span class="p">,</span> <span class="n">data_len</span><span class="p">)):</span>
            <span class="k">yield</span> <span class="n">data_array</span><span class="p">[</span><span class="n">start</span><span class="p">:</span><span class="n">end</span><span class="p">,</span> <span class="p">:]</span>
        <span class="k">return</span> <span class="n">data_array</span>
        
    <span class="k">def</span> <span class="nf">generate_labels</span><span class="p">(</span><span class="n">data</span><span class="p">,</span> <span class="n">windowlength</span><span class="p">,</span> <span class="n">label</span><span class="p">):</span>
        <span class="n">data_array</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">label</span><span class="p">]</span><span class="o">.</span><span class="n">values</span>
        <span class="n">data_length</span> <span class="o">=</span> <span class="n">data_array</span><span class="o">.</span><span class="n">shape</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
        <span class="k">return</span> <span class="n">data_array</span><span class="p">[</span><span class="n">windowlength</span><span class="p">:</span><span class="n">data_length</span><span class="p">,</span> <span class="p">:]</span>
    
    <span class="n">listout</span> <span class="o">=</span> <span class="nb">list</span><span class="p">()</span>
    <span class="k">if</span> <span class="n">iftest</span><span class="o">==</span><span class="mi">1</span><span class="p">:</span>
        
        <span class="n">initial_labels</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;rul&#39;</span><span class="p">]</span>
        <span class="n">test_array</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="n">features</span><span class="p">]</span>
        
        <span class="n">cv_array</span><span class="p">,</span> <span class="n">red_test_array</span><span class="p">,</span> <span class="n">cv_labels</span><span class="p">,</span> <span class="n">red_test_labels</span> <span class="o">=</span> <span class="n">cv</span><span class="o">.</span><span class="n">train_test_split</span><span class="p">(</span><span class="n">test_array</span><span class="p">,</span><span class="n">initial_labels</span><span class="p">,</span> <span class="n">test_size</span><span class="o">=</span><span class="mf">0.5</span><span class="p">,</span> <span class="n">random_state</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
        
        <span class="n">cv_generator</span><span class="o">=</span> <span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">generate_features</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">==</span><span class="nb">id</span><span class="p">],</span> <span class="n">windowlength</span><span class="p">,</span> <span class="n">features</span><span class="p">))</span> <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">())</span>

        <span class="n">test_generator</span><span class="o">=</span> <span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">generate_features</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">==</span><span class="nb">id</span><span class="p">],</span> <span class="n">windowlength</span><span class="p">,</span> <span class="n">features</span><span class="p">))</span> <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">())</span>
        
        <span class="n">test_features</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">test_generator</span><span class="p">))</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>
        <span class="n">cv_features</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">cv_generator</span><span class="p">))</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>

        
        <span class="n">cv_labels</span> <span class="o">=</span> <span class="p">[</span><span class="n">generate_labels</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">==</span><span class="nb">id</span><span class="p">],</span> <span class="n">windowlength</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;rul&#39;</span><span class="p">])</span> <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()]</span>
        <span class="n">cv_labels</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span><span class="n">cv_labels</span><span class="p">)</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>
        
        <span class="n">test_labels</span> <span class="o">=</span> <span class="p">[</span><span class="n">generate_labels</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">==</span><span class="nb">id</span><span class="p">],</span> <span class="n">windowlength</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;rul&#39;</span><span class="p">])</span> <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()]</span>
        <span class="n">test_labels</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span><span class="n">test_labels</span><span class="p">)</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>
        <span class="n">listout</span> <span class="o">=</span> <span class="p">[</span><span class="n">cv_features</span><span class="p">,</span><span class="n">cv_labels</span><span class="p">,</span><span class="n">test_features</span><span class="p">,</span><span class="n">test_labels</span><span class="p">]</span>
        
    <span class="k">else</span><span class="p">:</span>
        <span class="n">train_generator</span> <span class="o">=</span>  <span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">generate_features</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">==</span><span class="nb">id</span><span class="p">],</span> <span class="n">windowlength</span><span class="p">,</span> \
                                                   <span class="n">features</span><span class="p">))</span> <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">())</span>
        <span class="n">train_features</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span><span class="nb">list</span><span class="p">(</span><span class="n">train_generator</span><span class="p">))</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>  
        <span class="n">train_labels</span> <span class="o">=</span> <span class="p">[</span><span class="n">generate_labels</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">==</span><span class="nb">id</span><span class="p">],</span> <span class="n">windowlength</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;rul&#39;</span><span class="p">])</span> <span class="k">for</span> <span class="nb">id</span> <span class="ow">in</span> <span class="n">data</span><span class="p">[</span><span class="s1">&#39;id&#39;</span><span class="p">]</span><span class="o">.</span><span class="n">unique</span><span class="p">()]</span>
        <span class="n">train_labels</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">concatenate</span><span class="p">(</span><span class="n">train_labels</span><span class="p">)</span><span class="o">.</span><span class="n">astype</span><span class="p">(</span><span class="n">np</span><span class="o">.</span><span class="n">float32</span><span class="p">)</span>
        <span class="n">listout</span> <span class="o">=</span> <span class="p">[</span><span class="n">train_features</span><span class="p">,</span><span class="n">train_labels</span><span class="p">]</span>
  
    <span class="k">return</span> <span class="n">listout</span>
</pre></div>

</div>
</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Saving-the-Data">Saving the Data<a class="anchor-link" href="#Saving-the-Data">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[33]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">import</span> <span class="nn">pickle</span>
<span class="n">test_feature_names</span>  <span class="o">=</span> <span class="nb">list</span><span class="p">(</span><span class="nb">filter</span><span class="p">(</span><span class="k">lambda</span> <span class="n">s</span><span class="p">:</span> <span class="p">(</span><span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;dataset&#39;</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;lessthan&#39;</span><span class="p">)</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">s</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s1">&#39;rul&#39;</span><span class="p">)),</span> <span class="n">processed_test</span><span class="o">.</span><span class="n">columns</span><span class="p">))</span>

<span class="k">for</span> <span class="n">windowlength</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">5</span><span class="p">,</span><span class="mi">18</span><span class="p">]:</span> 
    <span class="n">filename</span> <span class="o">=</span> <span class="s1">&#39;datasets_final&#39;</span> <span class="o">+</span> <span class="s1">&#39;windowlen&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">windowlength</span><span class="p">)</span>
    <span class="n">outtrain</span> <span class="o">=</span> <span class="n">prepare_features</span><span class="p">(</span><span class="n">processed_train</span><span class="p">,</span><span class="n">windowlength</span><span class="p">,</span><span class="n">test_feature_names</span><span class="p">,</span> <span class="mi">0</span><span class="p">)</span>
    <span class="n">outtest</span> <span class="o">=</span> <span class="n">prepare_features</span><span class="p">(</span><span class="n">processed_test</span><span class="p">,</span><span class="n">windowlength</span><span class="p">,</span><span class="n">test_feature_names</span><span class="p">,</span> <span class="mi">1</span><span class="p">)</span>
    <span class="n">train_features</span><span class="p">,</span><span class="n">train_labels</span> <span class="o">=</span> <span class="n">outtrain</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span><span class="n">outtrain</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
    <span class="n">cv_features</span><span class="p">,</span><span class="n">cv_labels</span><span class="p">,</span><span class="n">test_features</span><span class="p">,</span><span class="n">test_labels</span> <span class="o">=</span> <span class="n">outtest</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span><span class="n">outtest</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span><span class="n">outtest</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span><span class="n">outtest</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span>
    <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
        <span class="n">pickle</span><span class="o">.</span><span class="n">dump</span><span class="p">([</span><span class="n">train_features</span><span class="p">,</span><span class="n">train_labels</span><span class="p">,</span><span class="n">test_features</span><span class="p">,</span><span class="n">test_labels</span><span class="p">,</span><span class="n">cv_features</span><span class="p">,</span><span class="n">cv_labels</span><span class="p">],</span> <span class="n">f</span><span class="p">)</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt"></div>
<div class="output_subarea output_text output_error">
<pre>
<span class="ansi-red-intense-fg ansi-bold">---------------------------------------------------------------------------</span>
<span class="ansi-red-intense-fg ansi-bold">OSError</span>                                   Traceback (most recent call last)
<span class="ansi-green-intense-fg ansi-bold">&lt;ipython-input-33-b2463d974f2c&gt;</span> in <span class="ansi-cyan-fg">&lt;module&gt;</span><span class="ansi-blue-intense-fg ansi-bold">()</span>
<span class="ansi-green-fg">      9</span>     cv_features<span class="ansi-yellow-intense-fg ansi-bold">,</span>cv_labels<span class="ansi-yellow-intense-fg ansi-bold">,</span>test_features<span class="ansi-yellow-intense-fg ansi-bold">,</span>test_labels <span class="ansi-yellow-intense-fg ansi-bold">=</span> outtest<span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-cyan-intense-fg ansi-bold">0</span><span class="ansi-yellow-intense-fg ansi-bold">]</span><span class="ansi-yellow-intense-fg ansi-bold">,</span>outtest<span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-cyan-intense-fg ansi-bold">1</span><span class="ansi-yellow-intense-fg ansi-bold">]</span><span class="ansi-yellow-intense-fg ansi-bold">,</span>outtest<span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-cyan-intense-fg ansi-bold">2</span><span class="ansi-yellow-intense-fg ansi-bold">]</span><span class="ansi-yellow-intense-fg ansi-bold">,</span>outtest<span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-cyan-intense-fg ansi-bold">3</span><span class="ansi-yellow-intense-fg ansi-bold">]</span>
<span class="ansi-green-fg">     10</span>     <span class="ansi-green-intense-fg ansi-bold">with</span> open<span class="ansi-yellow-intense-fg ansi-bold">(</span>filename<span class="ansi-yellow-intense-fg ansi-bold">,</span> <span class="ansi-blue-intense-fg ansi-bold">&#39;wb&#39;</span><span class="ansi-yellow-intense-fg ansi-bold">)</span> <span class="ansi-green-intense-fg ansi-bold">as</span> f<span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-intense-fg ansi-bold">---&gt; 11</span><span class="ansi-yellow-intense-fg ansi-bold">         </span>pickle<span class="ansi-yellow-intense-fg ansi-bold">.</span>dump<span class="ansi-yellow-intense-fg ansi-bold">(</span><span class="ansi-yellow-intense-fg ansi-bold">[</span>train_features<span class="ansi-yellow-intense-fg ansi-bold">,</span>train_labels<span class="ansi-yellow-intense-fg ansi-bold">,</span>test_features<span class="ansi-yellow-intense-fg ansi-bold">,</span>test_labels<span class="ansi-yellow-intense-fg ansi-bold">,</span>cv_features<span class="ansi-yellow-intense-fg ansi-bold">,</span>cv_labels<span class="ansi-yellow-intense-fg ansi-bold">]</span><span class="ansi-yellow-intense-fg ansi-bold">,</span> f<span class="ansi-yellow-intense-fg ansi-bold">)</span>

<span class="ansi-red-intense-fg ansi-bold">OSError</span>: [Errno 28] No space left on device</pre>
</div>
</div>

</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Machine-Learning-Modelling">Machine Learning Modelling<a class="anchor-link" href="#Machine-Learning-Modelling">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[35]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="c1">#################################################3 MACHINE LEARNING ###########################################</span>

<span class="kn">import</span> <span class="nn">pickle</span>
<span class="n">best_cv_mse</span> <span class="o">=</span> <span class="mi">10</span><span class="o">**</span><span class="mi">20</span>
<span class="n">modelidx</span><span class="o">=</span><span class="mi">1</span>

<span class="sd">&#39;&#39;&#39; KICKSTART INTO TRAINING&#39;&#39;&#39;</span>

<span class="n">units2</span> <span class="o">=</span> <span class="mi">20</span>
<span class="k">for</span> <span class="n">windowlength</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">5</span><span class="p">,</span><span class="mi">18</span><span class="p">]:</span>   
    <span class="k">for</span> <span class="n">dropout</span> <span class="ow">in</span> <span class="p">[</span><span class="mf">0.22</span><span class="p">,</span><span class="mf">0.5</span><span class="p">]:</span>
        <span class="k">for</span> <span class="n">units1</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">32</span><span class="p">,</span> <span class="mi">16</span><span class="p">]:</span>   
                <span class="n">filename</span> <span class="o">=</span> <span class="s1">&#39;datasets_final&#39;</span> <span class="o">+</span> <span class="s1">&#39;windowlen&#39;</span> <span class="o">+</span> <span class="nb">str</span><span class="p">(</span><span class="n">windowlength</span><span class="p">)</span>
                <span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s1">&#39;rb&#39;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
                    <span class="p">[</span><span class="n">train_features</span><span class="p">,</span><span class="n">train_labels</span><span class="p">,</span><span class="n">test_features</span><span class="p">,</span><span class="n">test_labels</span><span class="p">,</span><span class="n">cv_features</span><span class="p">,</span><span class="n">cv_labels</span><span class="p">]</span> <span class="o">=</span> <span class="n">pickle</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">f</span><span class="p">)</span>
            <span class="c1">#                  idx = np.random.randint(100, size=2)</span>
            <span class="c1">#                  train_s = train_features[idx,:]</span>
            <span class="c1">#                  train_l_s = train_labels[idx,:]</span>
                <span class="n">featurecount</span> <span class="o">=</span> <span class="mi">26</span>
                <span class="n">model</span> <span class="o">=</span> <span class="n">Sequential</span><span class="p">()</span>
                <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span>
                         <span class="n">input_shape</span><span class="o">=</span><span class="p">(</span><span class="n">windowlength</span><span class="p">,</span> <span class="n">featurecount</span><span class="p">),</span>
                         <span class="n">units</span><span class="o">=</span><span class="n">units1</span><span class="p">,</span> <span class="c1"># number of hidden units in the 1st hidden layer -- use 32-multiple</span>
                         <span class="n">return_sequences</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
                <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dropout</span><span class="p">(</span><span class="n">dropout</span><span class="p">))</span>
                <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span>
                          <span class="n">units</span><span class="o">=</span><span class="n">units2</span><span class="p">,</span> <span class="c1"># number of hidden units in the 2nd hidden layer</span>
                          <span class="n">return_sequences</span><span class="o">=</span><span class="kc">False</span><span class="p">))</span>
                <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dropout</span><span class="p">(</span><span class="n">dropout</span><span class="p">))</span>
                 <span class="c1"># &#39;&#39;&#39; OPTIMIZE DROPOUT &#39;&#39;&#39;</span>
                
                <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dense</span><span class="p">(</span><span class="n">units</span><span class="o">=</span><span class="mi">1</span><span class="p">))</span> <span class="c1"># add dense output layer</span>
                <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Activation</span><span class="p">(</span><span class="s2">&quot;linear&quot;</span><span class="p">))</span> <span class="c1"># &#39;&#39;&#39;******** CHOOSE ACTIVATION FUN ********</span>
                <span class="n">model</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">loss</span><span class="o">=</span><span class="s1">&#39;mean_squared_error&#39;</span><span class="p">,</span> <span class="n">optimizer</span><span class="o">=</span><span class="s1">&#39;rmsprop&#39;</span><span class="p">,</span><span class="n">metrics</span><span class="o">=</span><span class="p">[</span><span class="s1">&#39;mse&#39;</span><span class="p">,</span><span class="s1">&#39;mae&#39;</span><span class="p">])</span>
                
                <span class="nb">print</span><span class="p">(</span><span class="n">model</span><span class="o">.</span><span class="n">summary</span><span class="p">())</span>
                <span class="n">model_path</span> <span class="o">=</span> <span class="s1">&#39;./model_window&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">windowlength</span><span class="p">)</span><span class="o">+</span><span class="s1">&#39;hidden&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">units1</span><span class="p">)</span><span class="o">+</span><span class="s1">&#39;_&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">units2</span><span class="p">)</span><span class="o">+</span><span class="s1">&#39;dropout&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="n">dropout</span><span class="p">)</span><span class="o">+</span><span class="s1">&#39;batch&#39;</span><span class="o">+</span><span class="nb">str</span><span class="p">(</span><span class="mi">200</span><span class="p">)</span><span class="o">+</span><span class="s1">&#39;.h5&#39;</span>
                
                 
                <span class="n">history1</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">train_features</span><span class="p">,</span> <span class="n">train_labels</span><span class="p">,</span> <span class="n">epochs</span><span class="o">=</span><span class="mi">30</span><span class="p">,</span> <span class="n">batch_size</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span> <span class="n">validation_split</span><span class="o">=</span><span class="mf">0.05</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span>
                          <span class="n">callbacks</span> <span class="o">=</span> <span class="p">[</span><span class="n">EarlyStopping</span><span class="p">(</span><span class="n">monitor</span><span class="o">=</span><span class="s1">&#39;val_loss&#39;</span><span class="p">,</span> <span class="n">min_delta</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">patience</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="mi">2</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s1">&#39;min&#39;</span><span class="p">),</span>
                                       <span class="n">ModelCheckpoint</span><span class="p">(</span><span class="n">model_path</span><span class="p">,</span><span class="n">monitor</span><span class="o">=</span><span class="s1">&#39;val_loss&#39;</span><span class="p">,</span> <span class="n">save_best_only</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">mode</span><span class="o">=</span><span class="s1">&#39;min&#39;</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="mi">2</span><span class="p">)]</span>
                          <span class="p">)</span>
                
                <span class="c1"># list all data in history</span>
                <span class="nb">print</span><span class="p">(</span><span class="n">history1</span><span class="o">.</span><span class="n">history</span><span class="o">.</span><span class="n">keys</span><span class="p">())</span>
                
                <span class="n">cv_scores</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="n">cv_features</span><span class="p">,</span><span class="n">cv_labels</span><span class="p">,</span> <span class="n">batch_size</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span><span class="n">verbose</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
                <span class="n">cv_mse</span> <span class="o">=</span> <span class="n">cv_scores</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
                <span class="k">if</span> <span class="n">cv_mse</span> <span class="o">&lt;</span> <span class="n">best_cv_mse</span><span class="p">:</span>
                    <span class="n">best_model</span> <span class="o">=</span> <span class="n">model</span>
                    <span class="n">best_cv_mse</span> <span class="o">=</span> <span class="n">cv_mse</span> 
                <span class="n">modelidx</span> <span class="o">+=</span><span class="mi">1</span>            

<span class="n">test_scores</span> <span class="o">=</span> <span class="n">best_model</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="n">test_features</span><span class="p">,</span><span class="n">test_labels</span><span class="p">,</span> <span class="n">batch_size</span><span class="o">=</span><span class="mi">200</span><span class="p">,</span><span class="n">verbose</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Best model MSE: </span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">test_scores</span><span class="p">[</span><span class="mi">1</span><span class="p">]))</span>
<span class="nb">print</span><span class="p">(</span><span class="s1">&#39;</span><span class="se">\n</span><span class="s1">Best model MAE: </span><span class="si">{}</span><span class="s1">&#39;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">test_scores</span><span class="p">[</span><span class="mi">2</span><span class="p">]))</span>

<span class="n">test_predictions</span> <span class="o">=</span> <span class="n">best_model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">test_features</span><span class="p">)</span>
<span class="n">test_predictions</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt"></div>
<div class="output_subarea output_stream output_stdout output_text">
<pre>_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
lstm_3 (LSTM)                (None, 5, 32)             7552      
_________________________________________________________________
dropout_3 (Dropout)          (None, 5, 32)             0         
_________________________________________________________________
lstm_4 (LSTM)                (None, 20)                4240      
_________________________________________________________________
dropout_4 (Dropout)          (None, 20)                0         
_________________________________________________________________
dense_2 (Dense)              (None, 1)                 21        
_________________________________________________________________
activation_2 (Activation)    (None, 1)                 0         
=================================================================
Total params: 11,813
Trainable params: 11,813
Non-trainable params: 0
_________________________________________________________________
None
Train on 148973 samples, validate on 7841 samples
Epoch 1/30
Epoch 00001: val_loss improved from inf to 17460.30111, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 14s - loss: 18243.6865 - mean_squared_error: 18243.6865 - mean_absolute_error: 107.7474 - val_loss: 17460.3011 - val_mean_squared_error: 17460.3011 - val_mean_absolute_error: 106.0406
Epoch 2/30
Epoch 00002: val_loss improved from 17460.30111 to 14465.27907, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 11s - loss: 15119.9834 - mean_squared_error: 15119.9834 - mean_absolute_error: 95.0121 - val_loss: 14465.2791 - val_mean_squared_error: 14465.2791 - val_mean_absolute_error: 94.3814
Epoch 3/30
Epoch 00003: val_loss improved from 14465.27907 to 11958.90658, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 13s - loss: 12550.3028 - mean_squared_error: 12550.3028 - mean_absolute_error: 84.8045 - val_loss: 11958.9066 - val_mean_squared_error: 11958.9066 - val_mean_absolute_error: 84.7753
Epoch 4/30
Epoch 00004: val_loss improved from 11958.90658 to 9938.66998, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 10469.5637 - mean_squared_error: 10469.5637 - mean_absolute_error: 76.7881 - val_loss: 9938.6700 - val_mean_squared_error: 9938.6700 - val_mean_absolute_error: 77.2142
Epoch 5/30
Epoch 00005: val_loss improved from 9938.66998 to 8406.66730, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 8883.7065 - mean_squared_error: 8883.7065 - mean_absolute_error: 70.9533 - val_loss: 8406.6673 - val_mean_squared_error: 8406.6673 - val_mean_absolute_error: 71.7004
Epoch 6/30
Epoch 00006: val_loss improved from 8406.66730 to 7365.02157, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 11s - loss: 7783.6757 - mean_squared_error: 7783.6757 - mean_absolute_error: 67.3664 - val_loss: 7365.0216 - val_mean_squared_error: 7365.0216 - val_mean_absolute_error: 68.2328
Epoch 7/30
Epoch 00007: val_loss improved from 7365.02157 to 6820.86082, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 11s - loss: 7183.9095 - mean_squared_error: 7183.9095 - mean_absolute_error: 65.9879 - val_loss: 6820.8608 - val_mean_squared_error: 6820.8608 - val_mean_absolute_error: 66.7580
Epoch 8/30
Epoch 00008: val_loss improved from 6820.86082 to 6693.30261, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 7002.0525 - mean_squared_error: 7002.0525 - mean_absolute_error: 66.0440 - val_loss: 6693.3026 - val_mean_squared_error: 6693.3026 - val_mean_absolute_error: 66.5881
Epoch 9/30
Epoch 00009: val_loss improved from 6693.30261 to 6683.24704, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 11s - loss: 6989.6743 - mean_squared_error: 6989.6743 - mean_absolute_error: 66.2718 - val_loss: 6683.2470 - val_mean_squared_error: 6683.2470 - val_mean_absolute_error: 66.5879
Epoch 10/30
Epoch 00010: val_loss improved from 6683.24704 to 5294.87814, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 13s - loss: 6422.0455 - mean_squared_error: 6422.0455 - mean_absolute_error: 61.6181 - val_loss: 5294.8781 - val_mean_squared_error: 5294.8781 - val_mean_absolute_error: 56.6062
Epoch 11/30
Epoch 00011: val_loss improved from 5294.87814 to 4587.70812, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 5179.2983 - mean_squared_error: 5179.2983 - mean_absolute_error: 52.3440 - val_loss: 4587.7081 - val_mean_squared_error: 4587.7081 - val_mean_absolute_error: 52.7850
Epoch 12/30
Epoch 00012: val_loss improved from 4587.70812 to 4127.23232, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 4758.4983 - mean_squared_error: 4758.4983 - mean_absolute_error: 50.3775 - val_loss: 4127.2323 - val_mean_squared_error: 4127.2323 - val_mean_absolute_error: 50.6670
Epoch 13/30
Epoch 00013: val_loss improved from 4127.23232 to 3797.20454, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 11s - loss: 4456.6145 - mean_squared_error: 4456.6145 - mean_absolute_error: 49.1481 - val_loss: 3797.2045 - val_mean_squared_error: 3797.2045 - val_mean_absolute_error: 49.0518
Epoch 14/30
Epoch 00014: val_loss did not improve
 - 11s - loss: 4296.2783 - mean_squared_error: 4296.2783 - mean_absolute_error: 48.6037 - val_loss: 3875.3147 - val_mean_squared_error: 3875.3147 - val_mean_absolute_error: 50.5620
Epoch 15/30
Epoch 00015: val_loss improved from 3797.20454 to 3558.56029, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 11s - loss: 4191.9394 - mean_squared_error: 4191.9394 - mean_absolute_error: 48.2457 - val_loss: 3558.5603 - val_mean_squared_error: 3558.5603 - val_mean_absolute_error: 48.3073
Epoch 16/30
Epoch 00016: val_loss improved from 3558.56029 to 3429.12304, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 4148.1457 - mean_squared_error: 4148.1457 - mean_absolute_error: 48.1544 - val_loss: 3429.1230 - val_mean_squared_error: 3429.1230 - val_mean_absolute_error: 47.4970
Epoch 17/30
Epoch 00017: val_loss did not improve
 - 13s - loss: 4120.1283 - mean_squared_error: 4120.1283 - mean_absolute_error: 48.0475 - val_loss: 3537.5297 - val_mean_squared_error: 3537.5297 - val_mean_absolute_error: 48.5435
Epoch 18/30
Epoch 00018: val_loss improved from 3429.12304 to 3271.77879, saving model to ./model_window5hidden32_20dropout0.22batch200.h5
 - 12s - loss: 4089.2274 - mean_squared_error: 4089.2274 - mean_absolute_error: 47.9410 - val_loss: 3271.7788 - val_mean_squared_error: 3271.7788 - val_mean_absolute_error: 46.4184
Epoch 19/30
Epoch 00019: val_loss did not improve
 - 13s - loss: 4074.4856 - mean_squared_error: 4074.4856 - mean_absolute_error: 47.8921 - val_loss: 3868.4010 - val_mean_squared_error: 3868.4010 - val_mean_absolute_error: 51.8973
Epoch 20/30
Epoch 00020: val_loss did not improve
 - 12s - loss: 4055.7218 - mean_squared_error: 4055.7218 - mean_absolute_error: 47.7559 - val_loss: 3555.4776 - val_mean_squared_error: 3555.4776 - val_mean_absolute_error: 49.2776
Epoch 21/30
Epoch 00021: val_loss did not improve
 - 11s - loss: 4047.2257 - mean_squared_error: 4047.2257 - mean_absolute_error: 47.7298 - val_loss: 3511.2976 - val_mean_squared_error: 3511.2976 - val_mean_absolute_error: 49.1179
Epoch 22/30
Epoch 00022: val_loss did not improve
 - 11s - loss: 4030.6592 - mean_squared_error: 4030.6592 - mean_absolute_error: 47.5788 - val_loss: 3686.7367 - val_mean_squared_error: 3686.7367 - val_mean_absolute_error: 50.8124
Epoch 23/30
Epoch 00023: val_loss did not improve
 - 12s - loss: 4008.1302 - mean_squared_error: 4008.1302 - mean_absolute_error: 47.4770 - val_loss: 3568.1498 - val_mean_squared_error: 3568.1498 - val_mean_absolute_error: 49.8004
Epoch 24/30
Epoch 00024: val_loss did not improve
 - 11s - loss: 3999.7921 - mean_squared_error: 3999.7921 - mean_absolute_error: 47.3801 - val_loss: 3479.2709 - val_mean_squared_error: 3479.2709 - val_mean_absolute_error: 43.4856
Epoch 25/30
Epoch 00025: val_loss did not improve
 - 11s - loss: 3985.6833 - mean_squared_error: 3985.6833 - mean_absolute_error: 47.3081 - val_loss: 3667.8419 - val_mean_squared_error: 3667.8419 - val_mean_absolute_error: 50.7261
Epoch 26/30
Epoch 00026: val_loss did not improve
 - 11s - loss: 3975.1225 - mean_squared_error: 3975.1225 - mean_absolute_error: 47.2515 - val_loss: 3338.6143 - val_mean_squared_error: 3338.6143 - val_mean_absolute_error: 47.9253
Epoch 27/30
Epoch 00027: val_loss did not improve
 - 11s - loss: 3968.3731 - mean_squared_error: 3968.3731 - mean_absolute_error: 47.1488 - val_loss: 3775.1213 - val_mean_squared_error: 3775.1213 - val_mean_absolute_error: 51.6286
Epoch 28/30
Epoch 00028: val_loss did not improve
 - 12s - loss: 3962.3992 - mean_squared_error: 3962.3992 - mean_absolute_error: 47.1290 - val_loss: 3518.6160 - val_mean_squared_error: 3518.6160 - val_mean_absolute_error: 49.6193
Epoch 00028: early stopping
dict_keys([&#39;val_mean_squared_error&#39;, &#39;mean_absolute_error&#39;, &#39;loss&#39;, &#39;val_loss&#39;, &#39;val_mean_absolute_error&#39;, &#39;mean_squared_error&#39;])
101362/101362 [==============================] - 3s 27us/step
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
lstm_5 (LSTM)                (None, 5, 16)             2752      
_________________________________________________________________
dropout_5 (Dropout)          (None, 5, 16)             0         
_________________________________________________________________
lstm_6 (LSTM)                (None, 20)                2960      
_________________________________________________________________
dropout_6 (Dropout)          (None, 20)                0         
_________________________________________________________________
dense_3 (Dense)              (None, 1)                 21        
_________________________________________________________________
activation_3 (Activation)    (None, 1)                 0         
=================================================================
Total params: 5,733
Trainable params: 5,733
Non-trainable params: 0
_________________________________________________________________
None
Train on 148973 samples, validate on 7841 samples
Epoch 1/30
Epoch 00001: val_loss improved from inf to 17310.67991, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 13s - loss: 18119.0642 - mean_squared_error: 18119.0642 - mean_absolute_error: 107.2514 - val_loss: 17310.6799 - val_mean_squared_error: 17310.6799 - val_mean_absolute_error: 105.4554
Epoch 2/30
Epoch 00002: val_loss improved from 17310.67991 to 14338.84317, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 12s - loss: 14997.6173 - mean_squared_error: 14997.6173 - mean_absolute_error: 94.5127 - val_loss: 14338.8432 - val_mean_squared_error: 14338.8432 - val_mean_absolute_error: 93.8927
Epoch 3/30
Epoch 00003: val_loss improved from 14338.84317 to 11854.56645, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 11s - loss: 12449.1164 - mean_squared_error: 12449.1164 - mean_absolute_error: 84.3861 - val_loss: 11854.5665 - val_mean_squared_error: 11854.5665 - val_mean_absolute_error: 84.3799
Epoch 4/30
Epoch 00004: val_loss improved from 11854.56645 to 9857.30704, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 10381.9807 - mean_squared_error: 10381.9807 - mean_absolute_error: 76.4338 - val_loss: 9857.3070 - val_mean_squared_error: 9857.3070 - val_mean_absolute_error: 76.9150
Epoch 5/30
Epoch 00005: val_loss improved from 9857.30704 to 8349.01979, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 8814.5700 - mean_squared_error: 8814.5700 - mean_absolute_error: 70.7400 - val_loss: 8349.0198 - val_mean_squared_error: 8349.0198 - val_mean_absolute_error: 71.5006
Epoch 6/30
Epoch 00006: val_loss improved from 8349.01979 to 7331.12764, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 7750.9055 - mean_squared_error: 7750.9055 - mean_absolute_error: 67.2823 - val_loss: 7331.1276 - val_mean_squared_error: 7331.1276 - val_mean_absolute_error: 68.1293
Epoch 7/30
Epoch 00007: val_loss improved from 7331.12764 to 6807.14445, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 7178.3005 - mean_squared_error: 7178.3005 - mean_absolute_error: 66.0085 - val_loss: 6807.1444 - val_mean_squared_error: 6807.1444 - val_mean_absolute_error: 66.7305
Epoch 8/30
Epoch 00008: val_loss improved from 6807.14445 to 6695.84985, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 7004.4509 - mean_squared_error: 7004.4509 - mean_absolute_error: 66.1011 - val_loss: 6695.8498 - val_mean_squared_error: 6695.8498 - val_mean_absolute_error: 66.5885
Epoch 9/30
Epoch 00009: val_loss improved from 6695.84985 to 6683.28640, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 11s - loss: 6987.3465 - mean_squared_error: 6987.3465 - mean_absolute_error: 66.2784 - val_loss: 6683.2864 - val_mean_squared_error: 6683.2864 - val_mean_absolute_error: 66.5879
Epoch 10/30
Epoch 00010: val_loss improved from 6683.28640 to 6063.48299, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 11s - loss: 6876.7330 - mean_squared_error: 6876.7330 - mean_absolute_error: 65.3998 - val_loss: 6063.4830 - val_mean_squared_error: 6063.4830 - val_mean_absolute_error: 62.6513
Epoch 11/30
Epoch 00011: val_loss improved from 6063.48299 to 5234.55443, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 5455.3883 - mean_squared_error: 5455.3883 - mean_absolute_error: 54.2914 - val_loss: 5234.5544 - val_mean_squared_error: 5234.5544 - val_mean_absolute_error: 58.0197
Epoch 12/30
Epoch 00012: val_loss improved from 5234.55443 to 4339.86166, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 4883.5929 - mean_squared_error: 4883.5929 - mean_absolute_error: 51.1167 - val_loss: 4339.8617 - val_mean_squared_error: 4339.8617 - val_mean_absolute_error: 52.2343
Epoch 13/30
Epoch 00013: val_loss improved from 4339.86166 to 4021.74160, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 9s - loss: 4545.3259 - mean_squared_error: 4545.3259 - mean_absolute_error: 49.5668 - val_loss: 4021.7416 - val_mean_squared_error: 4021.7416 - val_mean_absolute_error: 50.7730
Epoch 14/30
Epoch 00014: val_loss improved from 4021.74160 to 3858.41947, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 4340.8387 - mean_squared_error: 4340.8387 - mean_absolute_error: 48.7488 - val_loss: 3858.4195 - val_mean_squared_error: 3858.4195 - val_mean_absolute_error: 50.1825
Epoch 15/30
Epoch 00015: val_loss improved from 3858.41947 to 3689.35609, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 4233.9159 - mean_squared_error: 4233.9159 - mean_absolute_error: 48.4288 - val_loss: 3689.3561 - val_mean_squared_error: 3689.3561 - val_mean_absolute_error: 49.0247
Epoch 16/30
Epoch 00016: val_loss improved from 3689.35609 to 3532.76918, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 4170.1057 - mean_squared_error: 4170.1057 - mean_absolute_error: 48.2817 - val_loss: 3532.7692 - val_mean_squared_error: 3532.7692 - val_mean_absolute_error: 48.3232
Epoch 17/30
Epoch 00017: val_loss did not improve
 - 11s - loss: 4142.7160 - mean_squared_error: 4142.7160 - mean_absolute_error: 48.2362 - val_loss: 3717.0961 - val_mean_squared_error: 3717.0961 - val_mean_absolute_error: 50.1549
Epoch 18/30
Epoch 00018: val_loss improved from 3532.76918 to 3302.99318, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 4114.4218 - mean_squared_error: 4114.4218 - mean_absolute_error: 48.1607 - val_loss: 3302.9932 - val_mean_squared_error: 3302.9932 - val_mean_absolute_error: 46.2680
Epoch 19/30
Epoch 00019: val_loss did not improve
 - 9s - loss: 4103.5430 - mean_squared_error: 4103.5430 - mean_absolute_error: 48.0979 - val_loss: 3504.7337 - val_mean_squared_error: 3504.7337 - val_mean_absolute_error: 48.5913
Epoch 20/30
Epoch 00020: val_loss improved from 3302.99318 to 3293.45098, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 10s - loss: 4080.8502 - mean_squared_error: 4080.8502 - mean_absolute_error: 48.0108 - val_loss: 3293.4510 - val_mean_squared_error: 3293.4510 - val_mean_absolute_error: 46.2851
Epoch 21/30
Epoch 00021: val_loss did not improve
 - 11s - loss: 4077.8651 - mean_squared_error: 4077.8651 - mean_absolute_error: 48.0267 - val_loss: 3387.2733 - val_mean_squared_error: 3387.2733 - val_mean_absolute_error: 47.5238
Epoch 22/30
Epoch 00022: val_loss did not improve
 - 10s - loss: 4061.0164 - mean_squared_error: 4061.0164 - mean_absolute_error: 47.9541 - val_loss: 3760.2049 - val_mean_squared_error: 3760.2049 - val_mean_absolute_error: 51.0497
Epoch 23/30
Epoch 00023: val_loss did not improve
 - 9s - loss: 4048.3199 - mean_squared_error: 4048.3199 - mean_absolute_error: 47.8463 - val_loss: 3402.6280 - val_mean_squared_error: 3402.6280 - val_mean_absolute_error: 48.0602
Epoch 24/30
Epoch 00024: val_loss improved from 3293.45098 to 3208.07822, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 11s - loss: 4040.2649 - mean_squared_error: 4040.2649 - mean_absolute_error: 47.7605 - val_loss: 3208.0782 - val_mean_squared_error: 3208.0782 - val_mean_absolute_error: 45.9213
Epoch 25/30
Epoch 00025: val_loss did not improve
 - 9s - loss: 4037.0065 - mean_squared_error: 4037.0065 - mean_absolute_error: 47.7739 - val_loss: 3620.6551 - val_mean_squared_error: 3620.6551 - val_mean_absolute_error: 49.7604
Epoch 26/30
Epoch 00026: val_loss did not improve
 - 10s - loss: 4020.2066 - mean_squared_error: 4020.2066 - mean_absolute_error: 47.6521 - val_loss: 3315.1013 - val_mean_squared_error: 3315.1013 - val_mean_absolute_error: 47.1795
Epoch 27/30
Epoch 00027: val_loss did not improve
 - 11s - loss: 4035.4189 - mean_squared_error: 4035.4189 - mean_absolute_error: 47.7063 - val_loss: 3535.4273 - val_mean_squared_error: 3535.4273 - val_mean_absolute_error: 49.5083
Epoch 28/30
Epoch 00028: val_loss did not improve
 - 11s - loss: 4005.1239 - mean_squared_error: 4005.1239 - mean_absolute_error: 47.5324 - val_loss: 3465.2887 - val_mean_squared_error: 3465.2887 - val_mean_absolute_error: 48.9044
Epoch 29/30
Epoch 00029: val_loss improved from 3208.07822 to 3148.58018, saving model to ./model_window5hidden16_20dropout0.22batch200.h5
 - 11s - loss: 4005.5608 - mean_squared_error: 4005.5608 - mean_absolute_error: 47.5320 - val_loss: 3148.5802 - val_mean_squared_error: 3148.5802 - val_mean_absolute_error: 45.8005
Epoch 30/30
Epoch 00030: val_loss did not improve
 - 11s - loss: 3983.5055 - mean_squared_error: 3983.5055 - mean_absolute_error: 47.3601 - val_loss: 3418.9356 - val_mean_squared_error: 3418.9356 - val_mean_absolute_error: 48.4840
dict_keys([&#39;val_mean_squared_error&#39;, &#39;mean_absolute_error&#39;, &#39;loss&#39;, &#39;val_loss&#39;, &#39;val_mean_absolute_error&#39;, &#39;mean_squared_error&#39;])
101362/101362 [==============================] - 3s 25us/step
_________________________________________________________________
Layer (type)                 Output Shape              Param #   
=================================================================
lstm_7 (LSTM)                (None, 5, 32)             7552      
_________________________________________________________________
dropout_7 (Dropout)          (None, 5, 32)             0         
_________________________________________________________________
lstm_8 (LSTM)                (None, 20)                4240      
_________________________________________________________________
dropout_8 (Dropout)          (None, 20)                0         
_________________________________________________________________
dense_4 (Dense)              (None, 1)                 21        
_________________________________________________________________
activation_4 (Activation)    (None, 1)                 0         
=================================================================
Total params: 11,813
Trainable params: 11,813
Non-trainable params: 0
_________________________________________________________________
None
Train on 148973 samples, validate on 7841 samples
Epoch 1/30
Epoch 00001: val_loss improved from inf to 17635.31703, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 17s - loss: 18432.1852 - mean_squared_error: 18432.1852 - mean_absolute_error: 108.5427 - val_loss: 17635.3170 - val_mean_squared_error: 17635.3170 - val_mean_absolute_error: 106.7267
Epoch 2/30
Epoch 00002: val_loss improved from 17635.31703 to 14624.31375, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 15302.4594 - mean_squared_error: 15302.4594 - mean_absolute_error: 95.7771 - val_loss: 14624.3137 - val_mean_squared_error: 14624.3137 - val_mean_absolute_error: 94.9963
Epoch 3/30
Epoch 00003: val_loss improved from 14624.31375 to 12098.01107, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 14s - loss: 12734.1419 - mean_squared_error: 12734.1419 - mean_absolute_error: 85.5456 - val_loss: 12098.0111 - val_mean_squared_error: 12098.0111 - val_mean_absolute_error: 85.3033
Epoch 4/30
Epoch 00004: val_loss improved from 12098.01107 to 10059.70777, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 14s - loss: 10689.7760 - mean_squared_error: 10689.7760 - mean_absolute_error: 77.6761 - val_loss: 10059.7078 - val_mean_squared_error: 10059.7078 - val_mean_absolute_error: 77.6603
Epoch 5/30
Epoch 00005: val_loss improved from 10059.70777 to 8509.11410, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 9168.1176 - mean_squared_error: 9168.1176 - mean_absolute_error: 72.1459 - val_loss: 8509.1141 - val_mean_squared_error: 8509.1141 - val_mean_absolute_error: 72.0593
Epoch 6/30
Epoch 00006: val_loss improved from 8509.11410 to 7452.39651, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 14s - loss: 8132.8805 - mean_squared_error: 8132.8805 - mean_absolute_error: 68.7939 - val_loss: 7452.3965 - val_mean_squared_error: 7452.3965 - val_mean_absolute_error: 68.5057
Epoch 7/30
Epoch 00007: val_loss improved from 7452.39651 to 6194.72492, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 14s - loss: 7089.0752 - mean_squared_error: 7089.0752 - mean_absolute_error: 63.1224 - val_loss: 6194.7249 - val_mean_squared_error: 6194.7249 - val_mean_absolute_error: 61.7383
Epoch 8/30
Epoch 00008: val_loss improved from 6194.72492 to 5336.17228, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 12s - loss: 6116.0747 - mean_squared_error: 6116.0747 - mean_absolute_error: 57.2180 - val_loss: 5336.1723 - val_mean_squared_error: 5336.1723 - val_mean_absolute_error: 57.3654
Epoch 9/30
Epoch 00009: val_loss improved from 5336.17228 to 4838.08793, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 5545.0578 - mean_squared_error: 5545.0578 - mean_absolute_error: 54.4196 - val_loss: 4838.0879 - val_mean_squared_error: 4838.0879 - val_mean_absolute_error: 55.3034
Epoch 10/30
Epoch 00010: val_loss improved from 4838.08793 to 4324.18363, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 5176.9823 - mean_squared_error: 5176.9823 - mean_absolute_error: 52.8811 - val_loss: 4324.1836 - val_mean_squared_error: 4324.1836 - val_mean_absolute_error: 52.5189
Epoch 11/30
Epoch 00011: val_loss improved from 4324.18363 to 3977.09921, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 4955.7832 - mean_squared_error: 4955.7832 - mean_absolute_error: 52.0162 - val_loss: 3977.0992 - val_mean_squared_error: 3977.0992 - val_mean_absolute_error: 50.0543
Epoch 12/30
Epoch 00012: val_loss improved from 3977.09921 to 3767.55455, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 4812.3493 - mean_squared_error: 4812.3493 - mean_absolute_error: 51.4644 - val_loss: 3767.5545 - val_mean_squared_error: 3767.5545 - val_mean_absolute_error: 49.1643
Epoch 13/30
Epoch 00013: val_loss improved from 3767.55455 to 3467.40491, saving model to ./model_window5hidden32_20dropout0.5batch200.h5
 - 13s - loss: 4729.0726 - mean_squared_error: 4729.0726 - mean_absolute_error: 51.1602 - val_loss: 3467.4049 - val_mean_squared_error: 3467.4049 - val_mean_absolute_error: 46.8466
Epoch 14/30
Epoch 00014: val_loss did not improve
 - 12s - loss: 4694.2134 - mean_squared_error: 4694.2134 - mean_absolute_error: 51.0649 - val_loss: 3481.1414 - val_mean_squared_error: 3481.1414 - val_mean_absolute_error: 47.3835
Epoch 15/30
Epoch 00015: val_loss did not improve
 - 12s - loss: 4652.4308 - mean_squared_error: 4652.4308 - mean_absolute_error: 50.9261 - val_loss: 3498.9110 - val_mean_squared_error: 3498.9110 - val_mean_absolute_error: 47.6375
Epoch 16/30
</pre>
</div>
</div>

<div class="output_area"><div class="prompt"></div>
<div class="output_subarea output_text output_error">
<pre>
<span class="ansi-red-intense-fg ansi-bold">---------------------------------------------------------------------------</span>
<span class="ansi-red-intense-fg ansi-bold">KeyboardInterrupt</span>                         Traceback (most recent call last)
<span class="ansi-green-intense-fg ansi-bold">&lt;ipython-input-35-440add01784f&gt;</span> in <span class="ansi-cyan-fg">&lt;module&gt;</span><span class="ansi-blue-intense-fg ansi-bold">()</span>
<span class="ansi-green-fg">     43</span>                 history1 = model.fit(train_features, train_labels, epochs=30, batch_size=200, validation_split=0.05, verbose=2,
<span class="ansi-green-fg">     44</span>                           callbacks = [EarlyStopping(monitor=&#39;val_loss&#39;, min_delta=0, patience=10, verbose=2, mode=&#39;min&#39;),
<span class="ansi-green-intense-fg ansi-bold">---&gt; 45</span><span class="ansi-yellow-intense-fg ansi-bold">                                        ModelCheckpoint(model_path,monitor=&#39;val_loss&#39;, save_best_only=True, mode=&#39;min&#39;, verbose=2)]
</span><span class="ansi-green-fg">     46</span>                           )
<span class="ansi-green-fg">     47</span> 

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\keras\models.py</span> in <span class="ansi-cyan-fg">fit</span><span class="ansi-blue-intense-fg ansi-bold">(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)</span>
<span class="ansi-green-fg">    958</span>                               initial_epoch<span class="ansi-yellow-intense-fg ansi-bold">=</span>initial_epoch<span class="ansi-yellow-intense-fg ansi-bold">,</span>
<span class="ansi-green-fg">    959</span>                               steps_per_epoch<span class="ansi-yellow-intense-fg ansi-bold">=</span>steps_per_epoch<span class="ansi-yellow-intense-fg ansi-bold">,</span>
<span class="ansi-green-intense-fg ansi-bold">--&gt; 960</span><span class="ansi-yellow-intense-fg ansi-bold">                               validation_steps=validation_steps)
</span><span class="ansi-green-fg">    961</span> 
<span class="ansi-green-fg">    962</span>     def evaluate(self, x, y, batch_size=32, verbose=1,

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\keras\engine\training.py</span> in <span class="ansi-cyan-fg">fit</span><span class="ansi-blue-intense-fg ansi-bold">(self, x, y, batch_size, epochs, verbose, callbacks, validation_split, validation_data, shuffle, class_weight, sample_weight, initial_epoch, steps_per_epoch, validation_steps, **kwargs)</span>
<span class="ansi-green-fg">   1655</span>                               initial_epoch<span class="ansi-yellow-intense-fg ansi-bold">=</span>initial_epoch<span class="ansi-yellow-intense-fg ansi-bold">,</span>
<span class="ansi-green-fg">   1656</span>                               steps_per_epoch<span class="ansi-yellow-intense-fg ansi-bold">=</span>steps_per_epoch<span class="ansi-yellow-intense-fg ansi-bold">,</span>
<span class="ansi-green-intense-fg ansi-bold">-&gt; 1657</span><span class="ansi-yellow-intense-fg ansi-bold">                               validation_steps=validation_steps)
</span><span class="ansi-green-fg">   1658</span> 
<span class="ansi-green-fg">   1659</span>     def evaluate(self, x=None, y=None,

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\keras\engine\training.py</span> in <span class="ansi-cyan-fg">_fit_loop</span><span class="ansi-blue-intense-fg ansi-bold">(self, f, ins, out_labels, batch_size, epochs, verbose, callbacks, val_f, val_ins, shuffle, callback_metrics, initial_epoch, steps_per_epoch, validation_steps)</span>
<span class="ansi-green-fg">   1211</span>                     batch_logs<span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-blue-intense-fg ansi-bold">&#39;size&#39;</span><span class="ansi-yellow-intense-fg ansi-bold">]</span> <span class="ansi-yellow-intense-fg ansi-bold">=</span> len<span class="ansi-yellow-intense-fg ansi-bold">(</span>batch_ids<span class="ansi-yellow-intense-fg ansi-bold">)</span>
<span class="ansi-green-fg">   1212</span>                     callbacks<span class="ansi-yellow-intense-fg ansi-bold">.</span>on_batch_begin<span class="ansi-yellow-intense-fg ansi-bold">(</span>batch_index<span class="ansi-yellow-intense-fg ansi-bold">,</span> batch_logs<span class="ansi-yellow-intense-fg ansi-bold">)</span>
<span class="ansi-green-intense-fg ansi-bold">-&gt; 1213</span><span class="ansi-yellow-intense-fg ansi-bold">                     </span>outs <span class="ansi-yellow-intense-fg ansi-bold">=</span> f<span class="ansi-yellow-intense-fg ansi-bold">(</span>ins_batch<span class="ansi-yellow-intense-fg ansi-bold">)</span>
<span class="ansi-green-fg">   1214</span>                     <span class="ansi-green-intense-fg ansi-bold">if</span> <span class="ansi-green-intense-fg ansi-bold">not</span> isinstance<span class="ansi-yellow-intense-fg ansi-bold">(</span>outs<span class="ansi-yellow-intense-fg ansi-bold">,</span> list<span class="ansi-yellow-intense-fg ansi-bold">)</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">   1215</span>                         outs <span class="ansi-yellow-intense-fg ansi-bold">=</span> <span class="ansi-yellow-intense-fg ansi-bold">[</span>outs<span class="ansi-yellow-intense-fg ansi-bold">]</span>

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\keras\backend\tensorflow_backend.py</span> in <span class="ansi-cyan-fg">__call__</span><span class="ansi-blue-intense-fg ansi-bold">(self, inputs)</span>
<span class="ansi-green-fg">   2355</span>         session <span class="ansi-yellow-intense-fg ansi-bold">=</span> get_session<span class="ansi-yellow-intense-fg ansi-bold">(</span><span class="ansi-yellow-intense-fg ansi-bold">)</span>
<span class="ansi-green-fg">   2356</span>         updated = session.run(fetches=fetches, feed_dict=feed_dict,
<span class="ansi-green-intense-fg ansi-bold">-&gt; 2357</span><span class="ansi-yellow-intense-fg ansi-bold">                               **self.session_kwargs)
</span><span class="ansi-green-fg">   2358</span>         <span class="ansi-green-intense-fg ansi-bold">return</span> updated<span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>len<span class="ansi-yellow-intense-fg ansi-bold">(</span>self<span class="ansi-yellow-intense-fg ansi-bold">.</span>outputs<span class="ansi-yellow-intense-fg ansi-bold">)</span><span class="ansi-yellow-intense-fg ansi-bold">]</span>
<span class="ansi-green-fg">   2359</span> 

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\tensorflow\python\client\session.py</span> in <span class="ansi-cyan-fg">run</span><span class="ansi-blue-intense-fg ansi-bold">(self, fetches, feed_dict, options, run_metadata)</span>
<span class="ansi-green-fg">    787</span>     <span class="ansi-green-intense-fg ansi-bold">try</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">    788</span>       result = self._run(None, fetches, feed_dict, options_ptr,
<span class="ansi-green-intense-fg ansi-bold">--&gt; 789</span><span class="ansi-yellow-intense-fg ansi-bold">                          run_metadata_ptr)
</span><span class="ansi-green-fg">    790</span>       <span class="ansi-green-intense-fg ansi-bold">if</span> run_metadata<span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">    791</span>         proto_data <span class="ansi-yellow-intense-fg ansi-bold">=</span> tf_session<span class="ansi-yellow-intense-fg ansi-bold">.</span>TF_GetBuffer<span class="ansi-yellow-intense-fg ansi-bold">(</span>run_metadata_ptr<span class="ansi-yellow-intense-fg ansi-bold">)</span>

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\tensorflow\python\client\session.py</span> in <span class="ansi-cyan-fg">_run</span><span class="ansi-blue-intense-fg ansi-bold">(self, handle, fetches, feed_dict, options, run_metadata)</span>
<span class="ansi-green-fg">    995</span>     <span class="ansi-green-intense-fg ansi-bold">if</span> final_fetches <span class="ansi-green-intense-fg ansi-bold">or</span> final_targets<span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">    996</span>       results = self._do_run(handle, final_targets, final_fetches,
<span class="ansi-green-intense-fg ansi-bold">--&gt; 997</span><span class="ansi-yellow-intense-fg ansi-bold">                              feed_dict_string, options, run_metadata)
</span><span class="ansi-green-fg">    998</span>     <span class="ansi-green-intense-fg ansi-bold">else</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">    999</span>       results <span class="ansi-yellow-intense-fg ansi-bold">=</span> <span class="ansi-yellow-intense-fg ansi-bold">[</span><span class="ansi-yellow-intense-fg ansi-bold">]</span>

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\tensorflow\python\client\session.py</span> in <span class="ansi-cyan-fg">_do_run</span><span class="ansi-blue-intense-fg ansi-bold">(self, handle, target_list, fetch_list, feed_dict, options, run_metadata)</span>
<span class="ansi-green-fg">   1130</span>     <span class="ansi-green-intense-fg ansi-bold">if</span> handle <span class="ansi-green-intense-fg ansi-bold">is</span> <span class="ansi-green-intense-fg ansi-bold">None</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">   1131</span>       return self._do_call(_run_fn, self._session, feed_dict, fetch_list,
<span class="ansi-green-intense-fg ansi-bold">-&gt; 1132</span><span class="ansi-yellow-intense-fg ansi-bold">                            target_list, options, run_metadata)
</span><span class="ansi-green-fg">   1133</span>     <span class="ansi-green-intense-fg ansi-bold">else</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">   1134</span>       return self._do_call(_prun_fn, self._session, handle, feed_dict,

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\tensorflow\python\client\session.py</span> in <span class="ansi-cyan-fg">_do_call</span><span class="ansi-blue-intense-fg ansi-bold">(self, fn, *args)</span>
<span class="ansi-green-fg">   1137</span>   <span class="ansi-green-intense-fg ansi-bold">def</span> _do_call<span class="ansi-yellow-intense-fg ansi-bold">(</span>self<span class="ansi-yellow-intense-fg ansi-bold">,</span> fn<span class="ansi-yellow-intense-fg ansi-bold">,</span> <span class="ansi-yellow-intense-fg ansi-bold">*</span>args<span class="ansi-yellow-intense-fg ansi-bold">)</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">   1138</span>     <span class="ansi-green-intense-fg ansi-bold">try</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-intense-fg ansi-bold">-&gt; 1139</span><span class="ansi-yellow-intense-fg ansi-bold">       </span><span class="ansi-green-intense-fg ansi-bold">return</span> fn<span class="ansi-yellow-intense-fg ansi-bold">(</span><span class="ansi-yellow-intense-fg ansi-bold">*</span>args<span class="ansi-yellow-intense-fg ansi-bold">)</span>
<span class="ansi-green-fg">   1140</span>     <span class="ansi-green-intense-fg ansi-bold">except</span> errors<span class="ansi-yellow-intense-fg ansi-bold">.</span>OpError <span class="ansi-green-intense-fg ansi-bold">as</span> e<span class="ansi-yellow-intense-fg ansi-bold">:</span>
<span class="ansi-green-fg">   1141</span>       message <span class="ansi-yellow-intense-fg ansi-bold">=</span> compat<span class="ansi-yellow-intense-fg ansi-bold">.</span>as_text<span class="ansi-yellow-intense-fg ansi-bold">(</span>e<span class="ansi-yellow-intense-fg ansi-bold">.</span>message<span class="ansi-yellow-intense-fg ansi-bold">)</span>

<span class="ansi-green-intense-fg ansi-bold">C:\Users\BCI-EXPERT\Anaconda3\lib\site-packages\tensorflow\python\client\session.py</span> in <span class="ansi-cyan-fg">_run_fn</span><span class="ansi-blue-intense-fg ansi-bold">(session, feed_dict, fetch_list, target_list, options, run_metadata)</span>
<span class="ansi-green-fg">   1119</span>         return tf_session.TF_Run(session, options,
<span class="ansi-green-fg">   1120</span>                                  feed_dict<span class="ansi-yellow-intense-fg ansi-bold">,</span> fetch_list<span class="ansi-yellow-intense-fg ansi-bold">,</span> target_list<span class="ansi-yellow-intense-fg ansi-bold">,</span>
<span class="ansi-green-intense-fg ansi-bold">-&gt; 1121</span><span class="ansi-yellow-intense-fg ansi-bold">                                  status, run_metadata)
</span><span class="ansi-green-fg">   1122</span> 
<span class="ansi-green-fg">   1123</span>     <span class="ansi-green-intense-fg ansi-bold">def</span> _prun_fn<span class="ansi-yellow-intense-fg ansi-bold">(</span>session<span class="ansi-yellow-intense-fg ansi-bold">,</span> handle<span class="ansi-yellow-intense-fg ansi-bold">,</span> feed_dict<span class="ansi-yellow-intense-fg ansi-bold">,</span> fetch_list<span class="ansi-yellow-intense-fg ansi-bold">)</span><span class="ansi-yellow-intense-fg ansi-bold">:</span>

<span class="ansi-red-intense-fg ansi-bold">KeyboardInterrupt</span>: </pre>
</div>
</div>

</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <h2 id="Bayesian-Optimization-using-Hyperas">Bayesian Optimization using Hyperas<a class="anchor-link" href="#Bayesian-Optimization-using-Hyperas">&#182;</a></h2>
      </div>
    </div>
  </div>
  <div class="cell border-box-sizing text_cell rendered" >
    <div class="prompt input_prompt">
</div>
    <div class="inner_cell">
      <div class="text_cell_render border-box-sizing rendered_html">
      <p>The following routine seemed to run very slowly, so it was not practical to wait around that much  on a slow laptop. Parallel Training on Mongo workers is indicated. Further advice very welcome!</p>

      </div>
    </div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[&nbsp;]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="kn">from</span> <span class="nn">keras.datasets</span> <span class="k">import</span> <span class="n">mnist</span>
<span class="kn">from</span> <span class="nn">keras.layers.core</span> <span class="k">import</span> <span class="n">Dense</span><span class="p">,</span> <span class="n">Dropout</span><span class="p">,</span> <span class="n">Activation</span>
<span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span>
<span class="kn">from</span> <span class="nn">keras.utils</span> <span class="k">import</span> <span class="n">np_utils</span>
<span class="kn">from</span> <span class="nn">keras.preprocessing</span> <span class="k">import</span> <span class="n">sequence</span>
<span class="kn">from</span> <span class="nn">keras.datasets</span> <span class="k">import</span> <span class="n">imdb</span>
<span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span>
<span class="kn">from</span> <span class="nn">keras.layers.embeddings</span> <span class="k">import</span> <span class="n">Embedding</span>
<span class="kn">from</span> <span class="nn">keras.layers.recurrent</span> <span class="k">import</span> <span class="n">LSTM</span>
<span class="kn">from</span> <span class="nn">keras.callbacks</span> <span class="k">import</span> <span class="n">EarlyStopping</span><span class="p">,</span> <span class="n">ModelCheckpoint</span>
<span class="kn">from</span> <span class="nn">keras.callbacks</span> <span class="k">import</span> <span class="n">TensorBoard</span>

<span class="kn">from</span> <span class="nn">hyperas</span> <span class="k">import</span> <span class="n">optim</span>
<span class="kn">from</span> <span class="nn">hyperas.distributions</span> <span class="k">import</span> <span class="n">choice</span><span class="p">,</span> <span class="n">uniform</span><span class="p">,</span> <span class="n">conditional</span>



<span class="kn">from</span> <span class="nn">hyperopt</span> <span class="k">import</span> <span class="n">fmin</span><span class="p">,</span> <span class="n">tpe</span><span class="p">,</span> <span class="n">hp</span><span class="p">,</span> <span class="n">STATUS_OK</span><span class="p">,</span> <span class="n">Trials</span>
<span class="kn">from</span> <span class="nn">sklearn.metrics</span> <span class="k">import</span> <span class="n">roc_auc_score</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">numpy</span> <span class="k">as</span> <span class="nn">np</span>




<span class="k">def</span> <span class="nf">create_data</span><span class="p">(</span><span class="n">X</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">X_val</span><span class="p">,</span><span class="n">y_val</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">X</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">X_val</span><span class="p">,</span><span class="n">y_val</span>

<span class="n">X</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">X_val</span><span class="p">,</span><span class="n">y_val</span> <span class="o">=</span> <span class="n">create_data</span><span class="p">(</span><span class="n">X</span><span class="p">,</span><span class="n">y</span><span class="p">,</span><span class="n">X_val</span><span class="p">,</span><span class="n">y_val</span><span class="p">)</span>

<span class="k">def</span> <span class="nf">create_model</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">X_val</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">y_val</span><span class="p">):</span>
    <span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span>
    <span class="kn">from</span> <span class="nn">keras.layers.core</span> <span class="k">import</span> <span class="n">Dense</span><span class="p">,</span> <span class="n">Dropout</span><span class="p">,</span> <span class="n">Activation</span>
    <span class="kn">from</span> <span class="nn">keras.optimizers</span> <span class="k">import</span> <span class="n">Adadelta</span><span class="p">,</span> <span class="n">Adam</span><span class="p">,</span> <span class="n">rmsprop</span>




<span class="k">def</span> <span class="nf">get_space</span><span class="p">():</span>
    <span class="k">return</span> <span class="p">{</span>
    <span class="s1">&#39;LSTM&#39;</span><span class="p">:</span> <span class="n">choice</span><span class="p">(</span><span class="s1">&#39;LSTM&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">32</span><span class="p">,</span> <span class="mi">64</span><span class="p">,</span> <span class="mi">128</span><span class="p">]),</span>
    <span class="s1">&#39;Dropout&#39;</span><span class="p">:</span> <span class="n">uniform</span><span class="p">(</span><span class="s1">&#39;Dropout&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span>
    <span class="s1">&#39;optimizer&#39;</span><span class="p">:</span> <span class="n">choice</span><span class="p">(</span><span class="s1">&#39;optimizer&#39;</span><span class="p">,</span> <span class="p">[</span><span class="s1">&#39;rmsprop&#39;</span><span class="p">,</span> <span class="s1">&#39;adam&#39;</span><span class="p">,</span> <span class="s1">&#39;sgd&#39;</span><span class="p">]),</span>
    <span class="s1">&#39;batch_size&#39;</span><span class="p">:</span> <span class="n">choice</span><span class="p">(</span><span class="s1">&#39;batch_size&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">64</span><span class="p">,</span> <span class="mi">128</span><span class="p">]),</span>
    <span class="s1">&#39;nb_epoch&#39;</span><span class="p">:</span> <span class="n">choice</span><span class="p">(</span><span class="s1">&#39;nb_epoch&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">10</span><span class="p">,</span> <span class="mi">20</span><span class="p">]),</span>
    <span class="p">}</span>


<span class="c1">########################### VER 1 ##################################</span>
<span class="n">space</span> <span class="o">=</span> <span class="p">{</span>   <span class="s1">&#39;units1&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="s1">&#39;units1&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">32</span><span class="p">,</span><span class="mi">64</span><span class="p">]),</span>
            <span class="s1">&#39;units2&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="s1">&#39;units2&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">13</span><span class="p">,</span><span class="mi">26</span><span class="p">]),</span>

            <span class="s1">&#39;dropout1&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="s1">&#39;dropout1&#39;</span><span class="p">,</span> <span class="o">.</span><span class="mi">25</span><span class="p">,</span><span class="o">.</span><span class="mi">75</span><span class="p">),</span>
            <span class="s1">&#39;dropout2&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="s1">&#39;dropout2&#39;</span><span class="p">,</span>  <span class="o">.</span><span class="mi">25</span><span class="p">,</span><span class="o">.</span><span class="mi">75</span><span class="p">),</span>

            <span class="s1">&#39;batch_size&#39;</span> <span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="s1">&#39;batch_size&#39;</span><span class="p">,</span> <span class="p">[</span><span class="mi">32</span><span class="p">,</span><span class="mi">64</span><span class="p">,</span><span class="mi">128</span><span class="p">]),</span>

            <span class="s1">&#39;epochs&#39;</span> <span class="p">:</span>  <span class="mi">5</span><span class="p">,</span>
            <span class="s1">&#39;optimizer&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="s1">&#39;optimizer&#39;</span><span class="p">,[</span><span class="s1">&#39;adadelta&#39;</span><span class="p">,</span><span class="s1">&#39;adam&#39;</span><span class="p">,</span><span class="s1">&#39;rmsprop&#39;</span><span class="p">]),</span>
            <span class="s1">&#39;activation&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">choice</span><span class="p">(</span><span class="s1">&#39;activation&#39;</span><span class="p">,[</span><span class="s1">&#39;linear&#39;</span><span class="p">,</span><span class="s1">&#39;relu&#39;</span><span class="p">])</span>
        <span class="p">}</span>

<span class="c1">#&#39;choice&#39;: hp.choice(&#39;num_layers&#39;,</span>
<span class="c1">#                    [ {&#39;layers&#39;:&#39;two&#39;, },</span>
<span class="c1">#                    {&#39;layers&#39;:&#39;three&#39;,</span>
<span class="c1">#                    &#39;units3&#39;: hp.choice(&#39;units3&#39;, [2]), </span>
<span class="c1">#                    &#39;dropout3&#39;: hp.uniform(&#39;dropout3&#39;, .25,.75)}</span>
<span class="c1">#                    ]),</span>

<span class="k">def</span> <span class="nf">f_nn</span><span class="p">(</span><span class="n">params</span><span class="p">):</span>   
    <span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span>
    <span class="kn">from</span> <span class="nn">keras.layers.core</span> <span class="k">import</span> <span class="n">Dense</span><span class="p">,</span> <span class="n">Dropout</span><span class="p">,</span> <span class="n">Activation</span>
    <span class="kn">from</span> <span class="nn">keras.optimizers</span> <span class="k">import</span> <span class="n">Adadelta</span><span class="p">,</span> <span class="n">Adam</span><span class="p">,</span> <span class="n">rmsprop</span>

    <span class="nb">print</span> <span class="p">(</span><span class="s1">&#39;Params testing: &#39;</span><span class="p">,</span> <span class="n">params</span><span class="p">)</span>
    <span class="n">model</span> <span class="o">=</span> <span class="n">Sequential</span><span class="p">()</span>
    <span class="c1">#model.add(Dense(output_dim=params[&#39;units1&#39;], input_dim = X.shape[1])) </span>
    <span class="c1">#model.add(Activation(params[&#39;activation&#39;]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span>
         <span class="n">input_shape</span><span class="o">=</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span> <span class="mi">29</span><span class="p">),</span>
         <span class="n">units</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;units1&#39;</span><span class="p">],</span> 
         <span class="n">return_sequences</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dropout</span><span class="p">(</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;dropout1&#39;</span><span class="p">]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span><span class="n">units</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;units2&#39;</span><span class="p">],</span><span class="n">return_sequences</span><span class="o">=</span><span class="kc">False</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dropout</span><span class="p">(</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;dropout2&#39;</span><span class="p">]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dense</span><span class="p">(</span><span class="n">units</span> <span class="o">=</span> <span class="mi">1</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Activation</span><span class="p">(</span><span class="s1">&#39;linear&#39;</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">loss</span><span class="o">=</span><span class="s1">&#39;mean_squared_error&#39;</span><span class="p">,</span> <span class="n">optimizer</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;optimizer&#39;</span><span class="p">])</span>
    <span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">epochs</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;epochs&#39;</span><span class="p">],</span> <span class="n">batch_size</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;batch_size&#39;</span><span class="p">],</span> <span class="n">verbose</span> <span class="o">=</span> <span class="mi">2</span><span class="p">)</span>
    <span class="n">score</span><span class="p">,</span> <span class="n">acc</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="n">X_val</span><span class="p">,</span> <span class="n">y_val</span><span class="p">,</span> <span class="n">show_accuracy</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>

    <span class="k">return</span> <span class="p">{</span><span class="s1">&#39;loss&#39;</span><span class="p">:</span> <span class="o">-</span><span class="n">acc</span><span class="p">,</span> <span class="s1">&#39;status&#39;</span><span class="p">:</span> <span class="n">STATUS_OK</span><span class="p">}</span>

<span class="c1"># ,&#39;model&#39;:model</span>
<span class="n">trials</span> <span class="o">=</span> <span class="n">Trials</span><span class="p">()</span>
<span class="n">best</span> <span class="o">=</span> <span class="n">fmin</span><span class="p">(</span><span class="n">f_nn</span><span class="p">,</span> <span class="n">space</span><span class="p">,</span> <span class="n">algo</span><span class="o">=</span><span class="n">tpe</span><span class="o">.</span><span class="n">suggest</span><span class="p">,</span> <span class="n">max_evals</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">trials</span><span class="o">=</span><span class="n">trials</span><span class="p">)</span>



<span class="c1">########################################### REWRITING TO BE MORE CLEAN ###################################</span>

<span class="k">def</span> <span class="nf">f_nn</span><span class="p">(</span><span class="n">params</span><span class="p">):</span>   
    <span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span>
    <span class="kn">from</span> <span class="nn">keras.layers.core</span> <span class="k">import</span> <span class="n">Dense</span><span class="p">,</span> <span class="n">Dropout</span><span class="p">,</span> <span class="n">Activation</span>
    <span class="kn">from</span> <span class="nn">keras.optimizers</span> <span class="k">import</span> <span class="n">Adadelta</span><span class="p">,</span> <span class="n">Adam</span><span class="p">,</span> <span class="n">rmsprop</span>

    <span class="nb">print</span> <span class="p">(</span><span class="s1">&#39;Params testing: &#39;</span><span class="p">,</span> <span class="n">params</span><span class="p">)</span>
    <span class="n">model</span> <span class="o">=</span> <span class="n">Sequential</span><span class="p">()</span>
    <span class="c1">#model.add(Dense(output_dim=params[&#39;units1&#39;], input_dim = X.shape[1])) </span>
    <span class="c1">#model.add(Activation(params[&#39;activation&#39;]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span>
         <span class="n">input_shape</span><span class="o">=</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span> <span class="mi">29</span><span class="p">),</span>
         <span class="n">units</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;units1&#39;</span><span class="p">],</span> 
         <span class="n">return_sequences</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">dropout</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="s1">&#39;dropout1&#39;</span><span class="p">]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span><span class="n">units</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;units2&#39;</span><span class="p">],</span><span class="n">return_sequences</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span><span class="n">dropout</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="s1">&#39;dropout2&#39;</span><span class="p">]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dense</span><span class="p">(</span><span class="n">units</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span><span class="n">activation</span><span class="o">=</span><span class="s1">&#39;linear&#39;</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">loss</span><span class="o">=</span><span class="s1">&#39;mean_squared_error&#39;</span><span class="p">,</span> <span class="n">optimizer</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;optimizer&#39;</span><span class="p">])</span>

    <span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">epochs</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;epochs&#39;</span><span class="p">],</span> <span class="n">batch_size</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s1">&#39;batch_size&#39;</span><span class="p">],</span> <span class="n">verbose</span> <span class="o">=</span> <span class="mi">2</span><span class="p">)</span>
    <span class="n">score</span><span class="p">,</span> <span class="n">acc</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="n">X_val</span><span class="p">,</span> <span class="n">y_val</span><span class="p">,</span> <span class="n">show_accuracy</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>

    <span class="k">return</span> <span class="p">{</span><span class="s1">&#39;loss&#39;</span><span class="p">:</span> <span class="o">-</span><span class="n">acc</span><span class="p">,</span> <span class="s1">&#39;status&#39;</span><span class="p">:</span> <span class="n">STATUS_OK</span><span class="p">,</span> <span class="s1">&#39;model&#39;</span><span class="p">:</span><span class="n">model</span><span class="p">}</span>
<span class="c1">###############################################</span>
    
    
    
    <span class="c1">############################################### VER 2 ############################################33</span>
    
<span class="n">space2</span> <span class="o">=</span> <span class="p">{</span>
            <span class="s1">&#39;dropout1&#39;</span><span class="p">:</span> <span class="n">hp</span><span class="o">.</span><span class="n">uniform</span><span class="p">(</span><span class="s1">&#39;dropout1&#39;</span><span class="p">,</span> <span class="o">.</span><span class="mi">25</span><span class="p">,</span><span class="o">.</span><span class="mi">75</span><span class="p">),</span>
        <span class="p">}</span>
        
<span class="k">def</span> <span class="nf">f2_nn</span><span class="p">(</span><span class="n">params</span><span class="p">):</span>   
    <span class="kn">from</span> <span class="nn">keras.models</span> <span class="k">import</span> <span class="n">Sequential</span>
    <span class="kn">from</span> <span class="nn">keras.layers.core</span> <span class="k">import</span> <span class="n">Dense</span><span class="p">,</span> <span class="n">Dropout</span><span class="p">,</span> <span class="n">Activation</span>
    <span class="kn">from</span> <span class="nn">keras.optimizers</span> <span class="k">import</span> <span class="n">Adadelta</span><span class="p">,</span> <span class="n">Adam</span><span class="p">,</span> <span class="n">rmsprop</span>

    <span class="nb">print</span> <span class="p">(</span><span class="s1">&#39;Params testing: &#39;</span><span class="p">,</span> <span class="n">params</span><span class="p">)</span>
    <span class="n">model</span> <span class="o">=</span> <span class="n">Sequential</span><span class="p">()</span>
    <span class="c1">#model.add(Dense(output_dim=params[&#39;units1&#39;], input_dim = X.shape[1])) </span>
    <span class="c1">#model.add(Activation(params[&#39;activation&#39;]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span>
         <span class="n">input_shape</span><span class="o">=</span><span class="p">(</span><span class="mi">32</span><span class="p">,</span> <span class="mi">29</span><span class="p">),</span>
         <span class="n">units</span><span class="o">=</span><span class="mi">20</span><span class="p">,</span> 
         <span class="n">return_sequences</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">dropout</span> <span class="o">=</span> <span class="n">params</span><span class="p">[</span><span class="s1">&#39;dropout1&#39;</span><span class="p">]))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">LSTM</span><span class="p">(</span><span class="n">units</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span><span class="n">return_sequences</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span><span class="n">dropout</span> <span class="o">=</span> <span class="mf">0.2</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">add</span><span class="p">(</span><span class="n">Dense</span><span class="p">(</span><span class="n">units</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span><span class="n">activation</span><span class="o">=</span><span class="s1">&#39;linear&#39;</span><span class="p">))</span>
    <span class="n">model</span><span class="o">.</span><span class="n">compile</span><span class="p">(</span><span class="n">loss</span><span class="o">=</span><span class="s1">&#39;mean_squared_error&#39;</span><span class="p">,</span> <span class="n">optimizer</span><span class="o">=</span><span class="s1">&#39;rmsprop&#39;</span><span class="p">)</span>

    <span class="n">model</span><span class="o">.</span><span class="n">fit</span><span class="p">(</span><span class="n">X</span><span class="p">,</span> <span class="n">y</span><span class="p">,</span> <span class="n">epochs</span><span class="o">=</span><span class="mi">5</span><span class="p">,</span> <span class="n">batch_size</span><span class="o">=</span><span class="mi">32</span><span class="p">,</span> <span class="n">verbose</span> <span class="o">=</span> <span class="mi">2</span><span class="p">)</span>
    <span class="n">score</span><span class="p">,</span> <span class="n">acc</span> <span class="o">=</span> <span class="n">model</span><span class="o">.</span><span class="n">evaluate</span><span class="p">(</span><span class="n">X_val</span><span class="p">,</span> <span class="n">y_val</span><span class="p">,</span> <span class="n">show_accuracy</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">verbose</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
    <span class="k">return</span> <span class="p">{</span><span class="s1">&#39;loss&#39;</span><span class="p">:</span> <span class="o">-</span><span class="n">acc</span><span class="p">,</span> <span class="s1">&#39;status&#39;</span><span class="p">:</span> <span class="n">STATUS_OK</span><span class="p">,</span> <span class="s1">&#39;model&#39;</span><span class="p">:</span><span class="n">model</span><span class="p">}</span>
    
<span class="n">best2</span> <span class="o">=</span> <span class="n">fmin</span><span class="p">(</span><span class="n">f2_nn</span><span class="p">,</span> <span class="n">space2</span><span class="p">,</span> <span class="n">algo</span><span class="o">=</span><span class="n">tpe</span><span class="o">.</span><span class="n">suggest</span><span class="p">,</span> <span class="n">max_evals</span><span class="o">=</span><span class="mi">3</span><span class="p">,</span> <span class="n">trials</span><span class="o">=</span><span class="n">trials</span><span class="p">)</span>
<span class="c1"># Info on why fmin : https://github.com/hyperopt/hyperopt/wiki/FMin</span>
</pre></div>

</div>
</div>
</div>

</div>
  </div>
  <div class="cell border-box-sizing code_cell rendered" >
    
<div class="cell border-box-sizing code_cell rendered">
<div class="input">
<div class="prompt input_prompt">In&nbsp;[37]:</div>
<div class="inner_cell">
    <div class="input_area">
<div class=" highlight hl-ipython3"><pre><span></span><span class="n">test_predictions</span> <span class="o">=</span> <span class="n">best_model</span><span class="o">.</span><span class="n">predict</span><span class="p">(</span><span class="n">test_features</span><span class="p">,</span><span class="n">verbose</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span><span class="n">batch_size</span><span class="o">=</span><span class="mi">1</span><span class="p">)</span>
<span class="n">test_predictions</span>
</pre></div>

</div>
</div>
</div>

<div class="output_wrapper">
<div class="output">


<div class="output_area"><div class="prompt"></div>
<div class="output_subarea output_stream output_stdout output_text">
<pre>101362/101362 [==============================] - 188s 2ms/step
</pre>
</div>
</div>

<div class="output_area"><div class="prompt output_prompt">Out[37]:</div>


<div class="output_text output_subarea output_execute_result">
<pre>array([[206.89023 ],
       [205.98921 ],
       [205.09381 ],
       ...,
       [ 75.5407  ],
       [ 80.448456],
       [ 68.66181 ]], dtype=float32)</pre>
</div>

</div>

</div>
</div>

</div>
  </div>
    </div>
  </div>
</body>
</html>
